Worker_connections are not enough

Hi

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?

Thanks
Bernhard

Posted at Nginx Forum:

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.

What is the reason to set worker_connections so low? (in general what’s
the reason to set it anything below 1024 even?).

But with 4 worker_connection the browser can’t load anything. (a blank page is
the result)

Modern browsers usually try to open more than those 4 connections to a
single host and that’s not even counting some “hanged/stray”
ones:

Firefox 4.x: 6
Firefox 3.6.x: 6
Internet Explorer 9.x: 6
Internet Explorer 8.x: dialup: 2, broadband: 6
Chrome 11.x: 6
Chrome 10.x: 6
Opera 11.x: 8
Safari 5.x: 6

rr

Hello!

On Mon, May 21, 2012 at 11:18:25AM -0400, bernhardp wrote:

(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.

Maxim DOunin

Ok. Thanks for your quick replies.
I set the worker_connections down to check the performance of nginx.
Can anybody tell me how nginx is working with over 1000 requests at the
same time, are there any common problems and how is the performance?
Is it normal that nginx cancel the request (that the page isn’t loading
completely)?

Posted at Nginx Forum:

So in this case the worker_connections should be set to at least (2 + 4

= 10. But what should be the optimal value for this? What are the
implications of using a high number of worker connections in this case?

Posted at Nginx Forum: