diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2012-12-10 17:46:51 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-12-10 17:46:51 +0000 |
| commit | e3cf44789f2a6e256a596f187c6d4211859f1d73 (patch) | |
| tree | a8a4bc3c2356a2ea3a40aec357b6dbecd663339a /src/os/unix/ngx_process_cycle.c | |
| parent | 72bba4144b29c22753fc7463088597b871c087fa (diff) | |
| download | nginx-e3cf44789f2a6e256a596f187c6d4211859f1d73.tar.gz nginx-e3cf44789f2a6e256a596f187c6d4211859f1d73.tar.bz2 | |
Merge of r4918: cache manager startup with many listen sockets.
Fixed failure to start cache manager and cache loader processes
if there were more than 512 listening sockets in configuration.
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
| -rw-r--r-- | src/os/unix/ngx_process_cycle.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index acafb7f6f..c9b0266ed 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -1296,14 +1296,19 @@ ngx_cache_manager_process_cycle(ngx_cycle_t *cycle, void *data) void *ident[4]; ngx_event_t ev; - cycle->connection_n = 512; - + /* + * Set correct process type since closing listening Unix domain socket + * in a master process also removes the Unix domain socket file. + */ ngx_process = NGX_PROCESS_HELPER; - ngx_worker_process_init(cycle, -1); - ngx_close_listening_sockets(cycle); + /* Set a moderate number of connections for a helper process. */ + cycle->connection_n = 512; + + ngx_worker_process_init(cycle, -1); + ngx_memzero(&ev, sizeof(ngx_event_t)); ev.handler = ctx->handler; ev.data = ident; |
