Thread: Общие вопросы (General Questions)/An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full

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

TCP/IP Registry Values for Microsoft Windows Vista and Windows Server 2008



www.microsoft.com/en-us/download/details.aspx





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

social.technet.microsoft.com/Forums/en-US/winservergen/thread/fd27e588-4a1d-4f3c-882a-9e95dabce794/


 





Re: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
How to tune the TCP/IP stack for high volume of web requests

www.outsystems.com/NetworkForums/ViewTopic.aspx


 


Windows 2008 R2



Reduce the TIME_WAIT by setting the TcpTimedWaitDelay TCP/IP parameter to 30 seconds on the windows registry key HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters, as a DWORD value.



Increase the range of ephemeral ports by setting the dynamicportrange to an higher value through the command netsh int ipv4 set dynamicportrange tcp start=32767 num=65535, this will set the port range from 32768 to 65535.



 





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

support.microsoft.com/kb/929851


The default dynamic port range for TCP/IP has changed in Windows Vista and in Windows Server 2008



        
  • netsh int ipv4 show dynamicport tcp





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

Running Netsh on Windows 2008/Vista Causes Invalid Registry Entries to be Created


blogs.technet.com/b/sbs/archive/2009/08/31/running-netsh-on-windows-2008-vista-causes-invalid-registry-entries-to-be-created.aspx





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

Setting TcpTimedWaitDelay:


pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp




        
  • TcpTimedWaitDelay
        

              
    • Description: Determines the time that must elapse before TCP/IP can release a closed connection and reuse its resources. This interval between closure and release is known as the TIME_WAIT state or twice the maximum segment lifetime (2MSL) state. During this time, reopening the connection to the client and server costs less than establishing a new connection. By reducing the value of this entry, TCP/IP can release closed connections faster and provide more resources for new connections. Adjust this parameter if the running application requires rapid release, the creation of new connections, or an adjustment because of a low throughput caused by multiple connections in the TIME_WAIT state.

    •         
    • How to view or set:
              

                    
      1. Use the regedit command, access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey, and create a new REG_DWORD value named TcpTimedWaitDelay.

      2.             
      3. Set the value to decimal 30, which is Hex 0x0000001e. This value sets the wait time to 30 seconds.

      4.             
      5. Stop and restart the system.

      6.         

              

    •         
    • Default value: 0xF0, which sets the wait time to 240 seconds (4 minutes).

    •         
    • Recommended value: A minimum value of 0x1E, which sets the wait time to 30 seconds.

    •     

        






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

Get statistics:


netstat -ano


and see how many ports are using