comparison src/os/unix/ngx_process_cycle.c @ 4500:9dfe02dd0f11

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 28 Feb 2012 11:40:18 +0000
parents d620f497c50f
children f31162fefe01
comparison
equal deleted inserted replaced
4499:778ef9c3fd2d 4500:9dfe02dd0f11
248 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, 248 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx,
249 ngx_core_module); 249 ngx_core_module);
250 ngx_start_worker_processes(cycle, ccf->worker_processes, 250 ngx_start_worker_processes(cycle, ccf->worker_processes,
251 NGX_PROCESS_JUST_RESPAWN); 251 NGX_PROCESS_JUST_RESPAWN);
252 ngx_start_cache_manager_processes(cycle, 1); 252 ngx_start_cache_manager_processes(cycle, 1);
253
254 /* allow new processes to start */
255 ngx_msleep(100);
256
253 live = 1; 257 live = 1;
254 ngx_signal_worker_processes(cycle, 258 ngx_signal_worker_processes(cycle,
255 ngx_signal_value(NGX_SHUTDOWN_SIGNAL)); 259 ngx_signal_value(NGX_SHUTDOWN_SIGNAL));
256 } 260 }
257 261