How to reduce the number of TIME WAIT sockets?

Solution Verified - Updated -

Issue

  • How do I reduce the number of TIME WAIT sockets?
  • A large number of TIME WAIT sockets are existing on the servers. How can they be reduced?
    -The netstat or netstat -an command shows many thousands of connections in TIME_WAIT state, such as below:

    tcp        0      0 ::ffff:10.0.0.1:53261  ::ffff:10.0.0.6:50000  TIME_WAIT
    tcp        0      0 ::ffff:10.0.0.1:52216  ::ffff:10.0.0.6:50000  TIME_WAIT
    tcp        0      0 ::ffff:10.0.0.1:51684  ::ffff:10.0.0.6:50000  TIME_WAIT
    tcp        0      0 ::ffff:10.0.0.1:50044  ::ffff:10.0.0.6:50000  TIME_WAIT
    .......
    
  • High TIME WAITs while running http, SQL, database, OSE, or any other TCP load tests

Environment

  • Red Hat Enterprise Linux
  • TCP network connections

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.