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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content