Thursday 25 February 2010

10060 Socket Error

To load and performance testers this will be a familiar message, however it often causes much confusion.
This message is seen under the following conditions:

  • The server has run out of socket connections
  • The injector has run out of socket connections
  • Socket connections are timing out
  • There is a network policy limiting the number of connections per machine
Useful tools:
The netstat command will list all active connections on the machine.
The regedit command (Registry Editor) and the following parameters (if you're not going to use Quotium Daemon to manage the changes):
  • \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\MaxUserPort
  • \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\TcpTimedWaitDelay
Remedies:
Load injector: If the injector machine has not been optimised to be a load injector, use the Quotium Daemon to adjust the registry settings for:
  • MaxUserPort - this is 5000 as standard in Windows 7, you can increase this to 65534. This is true for any windows OS. The parameter controls the maximum port number that is used when an application requests any available port, by increasing this value you increase the number of sockets available to applications on the machine.
  • TcpTimedWaitDelay - this is set to 240 by default in windows machines, this can be set between 30 - 300. Reduce the value to increase the turn around time for available sockets. The parameter controls the length of time a connection will stay in the TIME_WAIT state when being closed. While a connection is in the TIME_WAIT state,t he socket pair cannot be closed.
Other remedies:
It may be that the server is overloaded - in this case you need to speak to the application architects
It may be that network policy is stopping you open a large number of connections from a single workstation machine that you are using as an injector. Try installing QTest on multiple machines and distributing the load across all of these machines.

No comments:

Post a Comment