We saw lots of ephemeral sockets being created and destroyed, which overwhelmed Windows. We were able to get rid of these errors by increasing the number of sockets available and decreasing the time they are in a TIME_WAIT state. We did that by adding some keys to the registry:
Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters, add the following keys:
– TcpTimedWaitDelay: 30 (Decimal)
– MaxUserPort: 8FFF (Hexadecimal)
This increases the number of available connections from 16K to 32K, and ensures that connections are only in a TIME_WAIT state for 30 seconds, rather than the default of 120 seconds.
However, looking at the netstat command, I see 11,000 connections in the ESTABLISHED state connecting to DllHost. Since you run all the connections sequentially, you probably also want to lower the size of your MSMQ connection pool. In your bridgegate.xml, you should have the following entry:
<MSMQ_POOL MIN_SIZE=”2″ MAX_SIZE=”4″ />
You may need to experiment with the min and max values for maximum throughput. The defaults are 5 and 20, but there are many sockets opened per connection.