PDA

View Full Version : Hundreds of used up TCP ports in CLOSE_WAIT state (W2K)



majorizer
06-17-2005, 12:42 AM
Hi!

I don't know if that is a common browser "feature", but when I run IE or Firefox I see hundreds of TCP ports in "LISTEN" and "CLOSE_WAIT" state.

Maybe I can explain lingering "LISTEN"s by the fact that the browser needs to download all images/html/etc of a given URL via multiple connections... so it listens on multiple ports.

But then - why after all is done keep so many TCP connection points unusable by having them stay in "CLOSE_WAIT" state for hours in a row... On my machine this eventually saturates all 65535 available ports and after a couple of days I have to restart the browser, since other progrs like FTP, ICQ, etc. simply have no chance of finding an available port to open.

Can anyone suggest how to fix this? Is it my unpatched Windows or is it that browsers are resource hogs?

Thanks,
Maj

Brf
06-17-2005, 09:27 AM
The Close_wait interval is controled by the registry setting:

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Param eters\\TcpTimedWaitDelay

It can range from 30-300 seconds. The default is 240.

http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/Windows/2000/server/reskit/en-us/regentry/58770.asp (http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/Windows/2000/server/reskit/en-us/regentry/58811.asp>http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/Windows/2000/server/reskit/en-us/regentry/58811.asp</a>

Supposedly,)