Forum Discussion

Babu_Sundaram's avatar
Babu_Sundaram
Copper Contributor
Jul 31, 2025

Connection Refused at TCP/IP Level

Guys,

i have a web application running on Windows 2025. Occasionally, the application experiences bursts of over 500 simultaneous connections. Even though, the server showing less than 10% CPU utilization and about 75% of RAM still available, I am encountering "connection refused" errors. I can see Windows Performance counter TCPv4 / Connection Failures change when this happens. There is no antivirus deployed during my test, and Windows defender is off. i have seen similar issues on Windows 2019 and 2022 also. I suspected SynAttack detection, but the TCP diagnostic counters for SynAttack detection dont know any values.  It appears to me that there is some Windows OS limitation that causes this issue. Does anybody encounter this situation before? 

5 Replies

  • Babu_Sundaram's avatar
    Babu_Sundaram
    Copper Contributor

    TIME_WAIT was not high. Total Ephemeral connections are set to 49000 and we are only dealing with < 1000 total connections. 

  • Warmod's avatar
    Warmod
    Iron Contributor

    Your issue sounds like a limit on the number of pending or active TCP connections, or a backlog queue overflow, despite available resources. Focusing on TCP tuning and connection limits is key.

  • Babu_Sundaram's avatar
    Babu_Sundaram
    Copper Contributor

    Thanks Evenglow.  TIME_WAIT was not high. Total Ephemeral connection is set to 49000 and we are only dealing with < 1000 total connections. 

  • Evenglow's avatar
    Evenglow
    Iron Contributor

    Windows has internal limits on the number of concurrent TCP connections, particularly in the context of ephemeral ports and TCP connection states. Default ephemeral port range and TIME_WAIT handling can cause connection failures if overwhelmed.

    • Babu_Sundaram's avatar
      Babu_Sundaram
      Copper Contributor

      300 concurrent connections trying to establish is not a huge number, my server has very little load, yet connections are refused. 

Resources