mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
Fixed failure to start cache manager and cache loader processes
if there were more than 512 listening sockets in configuration.
This commit is contained in:
parent
246cbd21ce
commit
da130acfbe
@ -749,6 +749,8 @@ ngx_close_listening_sockets(ngx_cycle_t *cycle)
|
||||
|
||||
ls[i].fd = (ngx_socket_t) -1;
|
||||
}
|
||||
|
||||
cycle->listening.nelts = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user