Compiling Nginx on production. How to do it without down time.
Bob S.
farseas at gmail.com
Sat Oct 13 00:25:36 UTC 2012
I don't see how this can work.
Trying to replace the nginx executable with a new version of nginx, while
nginx is running, will produce:
cp: cannot create regular file `nginx': Text file busy
Or am I missing something?
This is standard behavior on any running executable in Linux.
On Fri, Oct 12, 2012 at 5:27 PM, Francis Daly <francis at daoine.org> wrote:
> On Fri, Oct 12, 2012 at 01:29:14PM -0700, Quintin Par wrote:
>
> Hi there,
>
> > Thanks for this. This looks a bit complicated.
> >
> > I’d assume that “make install” will overwrite the executable and that
> will
> > ensure everything. Or should I just go ahead and do service nginx restart
>
> "make install" will replace the binary. It won't run the new binary.
>
> After replacing the binary, you'll want to do something like
>
> kill -USR2 $(cat logs/nginx.pid)
>
> And after testing that things are working as expected, then
>
> kill -WINCH $(cat logs/nginx.pid.oldbin)
>
> followed eventually by
>
> kill -QUIT $(cat logs/nginx.pid.oldbin)
>
> The "control.html" page has more details about how to handle problems.
>
> "service nginx restart" probably doesn't do that sequence, and so probably
> won't be 0-downtime. But you can use your test system to find a sequence
> that works well enough for you.
>
> f
> --
> Francis Daly francis at daoine.org
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121012/f86a8505/attachment.html>
More information about the nginx
mailing list