On Thu, 24 Jul 2014, Alex Efros wrote:
> Hi!
>
> Is it possible to run nginx under runsv supervision without breaking
> nginx's ability to upgrade (SIGUSR2) or reload config (SIGHUP) gracefully
> without interrupting current connections?
I get this in nginx's error.log file when I do 'sv 2 /service/nginx':
2014/07/30 13:14:52 [crit] 17440#0: the changing binary signal is ignored:
you should shutdown or terminate before either old or new binary's process
This is my run file:
#! /bin/sh
exec 2>&1
exec nginx -c $PWD/nginx.conf
SIGHUP ('sv h /service/nginx') causes nginx.conf to be re-read, as
expected.
...
17440 --- SIGHUP (Hangup) _at_ 0 (0) ---
17440 gettimeofday({1406740841, 698673}, NULL) = 0
17440 sigreturn() = ? (mask now [HUP INT QUIT USR1
USR2 ALRM TERM CHLD WINCH IO])
17440 gettimeofday({1406740841, 698808}, NULL) = 0
17440 time(NULL) = 1406740841
17440 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3477, ...})
= 0
17440 gettimeofday({1406740841, 699084}, NULL) = 0
17440 uname({sys="Linux", node="oig143", ...}) = 0
17440 open("/var/service/nginx/nginx.conf", O_RDONLY|O_LARGEFILE) = 3
17440 fstat64(3, {st_mode=S_IFREG|0644, st_size=4900, ...}) = 0
17440 pread64(3, "#-------------------------------"..., 4096, 0) = 4096
...
>
> Same question is about hypnotoad (web server from perl's Mojolicious
> framework):
> http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Zero_downtime_software_upgrades
>
>
Received on Wed Jul 30 2014 - 17:22:25 UTC