Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

too many nginx waiting connections

My nginx status below:

Active connections: 1156598
server accepts handled requests
     429477742 429477742 2435052040 
Reading: 353 Writing: 45136 Waiting: 1111109 

As we can see, there are 1111109 waiting connections.

But with ss -s I only get 24453 tcp connections:

Total: 17618 (kernel 0)
TCP:   24453 (estab 17007, closed 6489, orphaned 622, synrecv 0, timewait 6466/0), ports 0

Transport Total     IP        IPv6
*         0         -         -        
RAW       0         0         0        
UDP       2         2         0        
TCP       17964     17961     3        
INET      17966     17963     3        
FRAG      0         0         0 

The value of Waiting connections is much higher than TCP connections, is it normal?

like image 255
leo Avatar asked Mar 03 '15 02:03

leo


1 Answers

Those are keepalive connections. They are usually not a problem. But if you want lower the number reduce keepalive_timeout.

https://www.ruby-forum.com/topic/203409

like image 120
José Montiel Avatar answered Sep 16 '22 23:09

José Montiel