too many nginx waiting connections

11,146

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

Share:
11,146
Admin
Author by

Admin

Updated on July 26, 2022

Comments

  • Admin
    Admin almost 2 years

    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?