Why Do I Receive a Socket Error When Using the SharePoint Task List Web Part?

Symptoms

In the SharePoint task list Web Part, the following error shows:

An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

Cause

There are two common causes for this error:

  • Windows runs out of memory for TCP buffers
  • Windows runs out of available TCP ephemeral ports

According to Microsoft, “When a client initiates a TCP/IP socket connection to a server, the client typically connects to a specific port on the server and requests that the server respond to the client over an ephemeral, or short lived, TCP or UDP port. On Windows Server 2003 and Windows XP the default range of ephemeral ports used by client applications is from 1025 through 5000. Under certain conditions it is possible that the available ports in the default range will be exhausted”.

All communication with AgilePoint Server is done as web service calls. “TcpTimedWaitDelay” attribute determines “the length of time that a connection stays in the TIME_WAIT state when the connection is being closed. While a connection is in the TIME_WAIT state, the socket pair cannot be reused / how long a closed port waits until the closed port can be reused”. The environment might have a higher TcpTimedWaitDelay value that is why ports are not released quickly. You can set it to low value like 30 and it makes more ports available quickly. Also by default for windows 2008, 16834 TCP ports are available and for windows 2003 , 5000 TCP ports are available. The solution is to increase # of TCP Ports on that machine and reduce the TcpTimedWaitDelay

.

More Information

For Windows 2003:

For Windows 2008:

Avoiding TCP/IP Port Exhaustion: