worker_connections are not enough
mdounin at mdounin.ru
Mon May 21 15:49:10 UTC 2012
On Mon, May 21, 2012 at 11:18:25AM -0400, bernhardp wrote:
> I am working with nginx and everything works fine!
> But when i set the worker_connections down on (for example 11) the page
> can't load completely (some pictures are missing). In the error-log is
> following error: worker_connections are not enough.
> The apache-benchmark can even handle 4 requests on 11 worker_connections
> without any error. (ab -n 100 -c 4...)
> I just have one client. I am using proxy_pass/proxy_redirect. In my mind
> I can use only 4 worker_connections
> (http://wiki.nginx.org/EventsModule). But with 4 worker_connection the
> browser can't load anything. (a blank page is the result)
> In my mind the request gets cancelled.
> Is this normal, is this a bug or is this my fault?
This is normal. Connection structures are used for listen
sockets, internal control sockets between nginx processes, and for
upstream connections. So with 1 worker process and one listen
socket there will be at least 2 connections used from very start,
and to handle 4 client connections with proxy_pass you need
worker_connections set to at least (2 + 4 + 4) = 10.
More information about the nginx