Klaus Demo nginx / 85b44b4
Events: added configuration check on the number of connections. There should be at least one worker connection for each listening socket, plus an additional connection for channel between worker and master, or starting worker processes will fail. Maxim Dounin 3 years ago
1 changed file(s) with 15 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
420420 return NGX_CONF_ERROR;
421421 }
422422
423 if (cycle->connection_n < cycle->listening.nelts + 1) {
424
425 /*
426 * there should be at least one connection for each listening
427 * socket, plus an additional connection for channel
428 */
429
430 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
431 "%ui worker_connections are not enough "
432 "for %ui listening sockets",
433 cycle->connection_n, cycle->listening.nelts);
434
435 return NGX_CONF_ERROR;
436 }
437
423438 #if (NGX_HAVE_REUSEPORT)
424439
425440 ls = cycle->listening.elts;