dose nginx support -HUP in single process mode? (Bug)
Maxim Dounin
mdounin at mdounin.ru
Tue Jan 11 08:34:21 MSK 2011
Hello!
On Tue, Jan 11, 2011 at 11:49:41AM +0800, Wu Bingzheng wrote:
> dose nginx support -HUP to reload configure in single process mode?
>
> It seems that it does support in the code: 'src/os/unix/ngx_process.c:ngx_signal_handler()'.
>
> However I think there is a bug when kill HUP to nginx in single process. we can show it like:
>
> add `master_process off` in configure file;
> run nginx;
> kill -HUP `cat logs/nginx.log`;
> kill -HUP `cat logs/nginx.log`; (yes, we kill HUP twice)
>
> then wait for about half of minite, the nignx will *core*!
>
> Nginx aborts at 'src/core/ngx_cycle.c:ngx_clean_old_cycles(): if (cycle[i]->connections[n].fd != (ngx_socket_t) -1)', where cycle[i].connections is NULL.
> The reason maybe nginx creates new cycle in ngx_init_cycle(), but didn't call the ngx_event_process_init() to init the connections.
Working without master process is intended for development only
and doesn't support configuration reloading.
Maxim Dounin
More information about the nginx
mailing list