PleskMainDBException Only one usage of each socket address (protocol/network address/port) is normally permitted

Created:

2016-11-16 12:59:16 UTC

Modified:

2017-08-11 14:24:13 UTC

1

Was this article helpful?


Have more questions?

Submit a request

PleskMainDBException Only one usage of each socket address (protocol/network address/port) is normally permitted

Applicable to:

  • Plesk for Windows

Symptoms

  1. Plesk, as well as webmail and other services, are not accessible, the following error message appears:

    
        ERROR: PleskMainDBException Only one usage of each socket address (protocol/network address/port) is normally permitted
       
  2. Migration from another Plesk server hangs with the same error.

  3. Backup is created with the same error message.

Cause

All available network ports on the machine are exhausted.

TCP/IP port exhaustion can occur on a server if the server is engaging in an unusually high number of TCIP/IP socket connections. This can occur if many client applications are initiating connections.

If all of the available ephemeral ports are allocated to client applications then the client experiences a condition known as TCP/IP port exhaustion. When TCP/IP port exhaustion occurs, client port reservations cannot be made and errors will occur in client applications that attempt to connect to a server via TCP/IP sockets.

TCP/IP port exhaustion is more likely to occur under high load conditions, than under normal load conditions.

Resolution

Note: If the following command will show a value close to maximum 65534

netstat -n | find "WAIT" /c
63448

then it's necessary to configure the firewall to temporarily block IP addresses having the highest connection count and go to step #2

  1. Increase the upper range of ephemeral ports that are dynamically allocated to client TCP/IP socket connections.

  2. Browse to, and then click the following key in the registry:

        HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\
    • On the Edit menu, click, New DWORD Value and then add the

      MaxUserPort - The max by default is 5000 . It can be set up to 65534 (decimal).

    • Close Registry Editor.

    Note: reboot the operating system for this change to take effect.

    Note: Increasing the range of ephemeral ports used for client TCP/IP connections consumes Windows kernel memory. Do not increase the upper limit for this setting to a value higher than is required to accommodate client application socket connections so as to minimize unnecessary consumption of Windows kernel memory.

  3. Reduce the client TCP/IP socket connection timeout value from the default value of 240 seconds. 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

    • Start Registry Editor.

    • Browse to, and then click the following key in the registry:

      HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters
    • On the Edit menu, click New , DWORD Value , and then add

      TcpTimedWaitDelay - decimal value between 30 and 240.

  4. Close Registry Editor.

    Note: reboot the operating system for this change to take effect.

For more information, please refer to the following Microsoft KB article:

https://msdn.microsoft.com/en-us/library/ee377084%28v=bts.70%29.aspx

Have more questions? Submit a request
Please sign in to leave a comment.