Recommendations
Modify the following two values in the Windows registry:
This one modifies the range of ports that Windows uses to open
connections. By default it only allows up to the port 5000. By
modifying this value, Windows will be able to open up more ports before
having to recycle back to the beginning. Every connection uses a port,
so it starts at 1025 and goes up to this value. When it reaches the max
value it goes back to 1025 and tries to open up that port again.
System Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Name: MaxUserPort
Type: REG_DWORD
Value: 5000-65534
This will "release" closed ports faster. By default Windows leaves a
port in a TIME_WAIT state for 240 seconds. This can cause problems if
the MaxPort value is set to where a new connection will use an "older"
port that has not been removed from TIME_WAIT state yet. By decreasing
this value, you allow the connections to be released faster.
System Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Value Name: TcpTimedWaitDelay
Data Type: REG_DWORD
Value Data: 30-300