none
Windows Server 2012 and TCP/IP MaxUserPort? RRS feed

  • Question

  • Hi,

    We're currently running a W2K12 server which hosts an application developed inside of our organisation.

    Long story short: The way it works is like chat or messaging, we have some clients connecting to this server and it displays in real time all informations about the change of state of some files (actually it opens 1 tcp connection per file and per client, so it can bring many connections).

    Now for the errors:

    Sometimes the server becomes inaccessible no network access anymore with 2 events:

    ID 4227:

    TCP/IP failed to establish an outgoing connection because the selected local endpoint was recently used to connect to the same remote endpoint. This error typically occurs when outgoing connections are opened and closed at a high rate, causing all available local ports to be used and forcing TCP/IP to reuse a local port for an outgoing connection. To minimize the risk of data corruption, the TCP/IP standard requires a minimum time period to elapse between successive connections from a given local endpoint to a given remote endpoint.

    ID 4231:

    A request to allocate an ephemeral port number from the global TCP port space has failed due to all such ports being in use.

    Is there any way to resolve this? In previous version of windows server there was some registry entry for the tcpip parameters but they don't seem to exists anymore.

    Thanks in advance for any help!

    Friday, October 25, 2013 9:17 AM

Answers

  • Hi,

    It seems like the TCP Port exhaustion. Please try the following resolution.

    We will try setting up to reduce the TCP time_wait delay and increase the max user port value. See the below instructions.

    1. TCP TIME-WAIT Delay:

     Set the TcpTimedWaitDelay registry key that is available in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to 30 secs.

    If the registry key is not present, please create them and set it to the value that we had suggested above.

     

    2. MaxUserPorts:

    Set the MaxUserPorts registry key that is available in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to 65,500.

    Again if the registry key is not present, please create them and set it to the value that we had suggested above.

     Refer the following article for more information:

    TCP TIME-WAIT Delay :  http://technet.microsoft.com/en-us/library/cc962453.aspx

    Hope this helps.


    Alex Lv


    Tuesday, October 29, 2013 10:52 AM
    Moderator

All replies

  • Hi,

    It seems like the TCP Port exhaustion. Please try the following resolution.

    We will try setting up to reduce the TCP time_wait delay and increase the max user port value. See the below instructions.

    1. TCP TIME-WAIT Delay:

     Set the TcpTimedWaitDelay registry key that is available in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to 30 secs.

    If the registry key is not present, please create them and set it to the value that we had suggested above.

     

    2. MaxUserPorts:

    Set the MaxUserPorts registry key that is available in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to 65,500.

    Again if the registry key is not present, please create them and set it to the value that we had suggested above.

     Refer the following article for more information:

    TCP TIME-WAIT Delay :  http://technet.microsoft.com/en-us/library/cc962453.aspx

    Hope this helps.


    Alex Lv


    Tuesday, October 29, 2013 10:52 AM
    Moderator
  • Hi,

    Just want to confirm the current situations.

    Please feel free to let us know if you need further assistance.

    Regards.


    Alex Lv

    Tuesday, November 5, 2013 8:14 AM
    Moderator
  • It's MaxUserPort, not MaxUserPorts.

    Leave the S off the end.

    http://technet.microsoft.com/en-us/library/cc938196.aspx

    Ed Hammond - System Admin


    • Edited by Mr.Ed Monday, November 10, 2014 6:13 PM
    Monday, November 10, 2014 6:13 PM
  • Hi,

    Is both the ID's (4227, 4231) indicates server not connected with the network? (i.e, No connection with clients and domain)


    vicky

    Tuesday, July 26, 2016 9:02 PM