Forum: NGINX How many connections can nginx handle?

Posted by arnoldguo (Guest)
on 2012-11-09 04:47
(Received via mailing list)
I have a server running proxy_pass the http request(mainly GET,html,jpg
etc.) to backend server(20+ server running nginx cache).
this server with 32 core CPU,64G RAM,2X 10G NIC,RHEL 6.3,backend server 
with
1000M NIC.
When the load raise to 300k connections,3Gbps network traffic,new 
connection
can not be serviced,cannot connect to nginx's port,but the system load 
is
low(~1.00),and has many free memory,
no errorlog in /var/log/message,has some nginx errorlog like"upstream 
timed
out to backend server",
but the backend's service is normal,load is not hight...
i have tune  tcp config,can handle 2000K conn,it seems that nginx cannot
handle so much connection?

nginx config:
worker_processes 32;use worker_cpu_affinity;
keepalive 32 to backend servers,
proxy_buffering on or off has the same result...

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,232623,232623#msg-232623
Posted by Maxim Konovalov (Guest)
on 2012-11-09 10:47
(Received via mailing list)
On 11/9/12 7:46 AM, arnoldguo wrote:
> i have tune  tcp config,can handle 2000K conn,it seems that nginx cannot
> handle so much connection?
>
How did you do that and how did you check that the OS can handle 2M
tcp connections?

> nginx config:
> worker_processes 32;use worker_cpu_affinity;
> keepalive 32 to backend servers,
> proxy_buffering on or off has the same result...
>
It's almost always about tuning various OS limits not nginx.

As for nginx, this link is a good start:

http://nginx.org/en/docs/ngx_core_module.html#work...

--
Maxim Konovalov
+7 (910) 4293178
http://nginx.com/support.html
Posted by arnoldguo (Guest)
on 2012-11-12 02:58
(Received via mailing list)
Maxim Konovalov Wrote:
-------------------------------------------------------
> load is
> tcp connections?
>
I use a 3rd nginx PUSH module,and can get 2M nginx connections...

>
> --
> Maxim Konovalov
> +7 (910) 4293178
> http://nginx.com/support.html
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,232623,232712#msg-232712
Posted by Valentin V. Bartenev (Guest)
on 2012-11-12 04:01
(Received via mailing list)
On Friday 09 November 2012 07:46:50 arnoldguo wrote:
> [...]
> nginx config:
> worker_processes 32;use worker_cpu_affinity;
> keepalive 32 to backend servers,
> proxy_buffering on or off has the same result...

http://nginx.org/r/worker_connections

 wbr, Valentin V. Bartenev
Posted by arnoldguo (Guest)
on 2012-11-12 09:31
(Received via mailing list)
worker_connections has been set to 1048576;
As a reverse proxy situation, max clients becomes
max clients = worker_processes * worker_connections/4
should handle 8 million connections,but on my server limit to 300k
conn,what's wrong?

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,232623,232718#msg-232718
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.