I am using proxy_cache as a cache server, about 20-30k requests /s. It
sometimes gets slow,and I find lots of such messages:
2014/11/05 17:01:32 [alert] 22169#0: 512 worker_connections are not
enough
2014/11/05 17:01:32 [alert] 22169#0: 512 worker_connections are not
enough
2014/11/05 17:04:12 [alert] 22169#0: 512 worker_connections are not
enough
2014/11/05 17:04:12 [alert] 22169#0: 512 worker_connections are not
enough
2014/11/05 17:04:12 [alert] 22169#0: 512 worker_connections are not
enough
process 22169 is the “nginx: cache manager process” .
Should I modify the num of cache_manager_process_cycle->connection_n
in
src/os/unix/ngx_process_cycle.c, and rebuild nginx ?
1310 static void
1311 ngx_cache_manager_process_cycle(ngx_cycle_t *cycle, void *data)
1312 {
1313 ngx_cache_manager_ctx_t *ctx = data;
1314
1315 void ident[4];
1316 ngx_event_t ev;
1317
1318 /
1319 * Set correct process type since closing listening Unix domain
socket
1320 * in a master process also removes the Unix domain socket
file.
1321 /
1322 ngx_process = NGX_PROCESS_HELPER;
1323
1324 ngx_close_listening_sockets(cycle);
1325
1326 / Set a moderate number of connections for a helper process.
*/
1327 cycle->connection_n = 512;
1328
On Wed, Nov 05, 2014 at 04:33:16AM -0500, zhijianpeng wrote:
I am using proxy_cache as a cache server, about 20-30k requests /s. It
sometimes gets slow,and I find lots of such messages:
2014/11/05 17:01:32 [alert] 22169#0: 512 worker_connections are not enough
2014/11/05 17:01:32 [alert] 22169#0: 512 worker_connections are not enough
2014/11/05 17:04:12 [alert] 22169#0: 512 worker_connections are not enough
2014/11/05 17:04:12 [alert] 22169#0: 512 worker_connections are not enough
2014/11/05 17:04:12 [alert] 22169#0: 512 worker_connections are not enough
process 22169 is the “nginx: cache manager process” .
Do you use 3rd party modules/patches? What “nginx -V” shows?
Should I modify the num of cache_manager_process_cycle->connection_n in
src/os/unix/ngx_process_cycle.c, and rebuild nginx ?
While this may help in your particular case, it’s wrong in general
as cache manager isn’t expected to use many connections. It would
be better to find out what goes on here.
Yes,we found that it was caused by a 3rd party module named
“nginx_upstream_check_module”.
I want to know the use of connections in cache manager process. And if
there are no free connections of cache manager process,any thing bad
would
happend?
On Mon, Nov 10, 2014 at 10:16:16AM -0500, zhijianpeng wrote:
Yes,we found that it was caused by a 3rd party module named
“nginx_upstream_check_module”.
I want to know the use of connections in cache manager process. And if
there are no free connections of cache manager process,any thing bad would
happend?
In nginx own code in an already running cache manager process
nothing bad should happen as it doesn’t allocate any new
connections. On the other hand, anything can happen in the
problematic 3rd party module.