We were wondering the following:
Imaging upgrading nginx by compiling the new version, and doing a make install.
The targets are all the same, essentially the old version is overwritten (we usually pull the configure string from nginx -V).
Is it sufficient to do a nginx -s reload to force the new version of nginx to start being used? Or do we have to kill the process and start it back up?
We are asking this to try and limit downtime as much as possible. I know I know, a quick killall nginx ; nginx.... is a second of downtime... But why have even that second of downtime if it can be avoided.
Thanks.
Answer
nginx -s reload
is not sufficient to upgrade to a new binary. Read this entry on the wiki to see the series of signals that need to be sent to upgrade to a new binary. Alternatively, since you're already installing from source, there's a make upgrade
target you can run after make install
that will send the signals for you.
No comments:
Post a Comment