Author: mdounin
Date: 2012-02-28 11:40:18 +0000 (Tue, 28 Feb 2012)
New Revision: 4501
Log:
Added msleep() on reload to allow new processes to start.
This is expected to ensure smoother operation on reload (and with less
chance of listen queue overflows).
Prodded by Igor Sysoev.
Modified:
trunk/src/os/unix/ngx_process_cycle.c
Modified: trunk/src/os/unix/ngx_process_cycle.c
===================================================================
--- trunk/src/os/unix/ngx_process_cycle.c 2012-02-28 11:31:05 UTC (rev 4500)
+++ trunk/src/os/unix/ngx_process_cycle.c 2012-02-28 11:40:18 UTC (rev 4501)
@@ -250,6 +250,10 @@
ngx_start_worker_processes(cycle, ccf->worker_processes,
NGX_PROCESS_JUST_RESPAWN);
ngx_start_cache_manager_processes(cycle, 1);
+
+ /* allow new processes to start */
+ ngx_msleep(100);
+
live = 1;
ngx_signal_worker_processes(cycle,
ngx_signal_value(NGX_SHUTDOWN_SIGNAL));
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel