Connections to IIS sometimes get stuck in CLOSE_WAIT state

Posted by randomhuman on Server Fault See other posts from Server Fault or by randomhuman
Published on 2011-03-14T14:56:00Z Indexed on 2012/06/23 21:18 UTC
Read the original article Hit count: 197

Filed under:
|
|
|
|

Our application includes an ASP.Net web service that only needs to deal with a handful of clients. As such, the 10 incoming connection limit of Windows XP Pro is generally not a problem. However, on one particular server, connections are occasionally becoming stuck in the CLOSE_WAIT state. These connections build up over time and eventually new client connections are refused because the maximum number of connections are used up.

From my googling it sounds like a failure of the webservice to properly close the connection can cause this problem, but as it works just fine on hundreds of other Windows XP pro machines I can't see it being a bug in our code. It also ran fine on the affected machine until some shenanigans on the part of the end user (I think they set about deleting duplicate files in order to reduce their disk usage, but they did not exactly come clean about it).

What could the user have changed to introduce this problem? Is there any way I can force connections that are in CLOSE_WAIT to time out rather than letting them hang around? I have seen suggestions to reduce TcpTimedWaitDelay, but that only relates to the TIME_WAIT state, and changing it did not have any effect.

© Server Fault or respective owner

Related posts about Windows

Related posts about windows-xp