Compiling Nginx on production. How to do it without down time.
Francis Daly
francis at daoine.org
Fri Oct 12 21:27:23 UTC 2012
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
More information about the nginx
mailing list