Error 10048 Address already in use

Document created by sheng_liao462475 Employee on Aug 27, 2018Last modified by sheng_liao462475 Employee on Aug 28, 2018
Version 3Show Document
  • View in full screen mode

Error

10048 Address already in use 

 

Cause

This error occurs when your OS cannot allocate new sockets. On Windows the default limitation is 5000 - 1024 open ports (5000 is the default max user port setting and the first 1024 ports are reserved).

 

Solution

You can increase the default maximum socket value in the registry. 

 

To increase the maximum number of ephemeral ports, follow these steps:
1. Start Registry Editor. Type regedit in window search box.


2. Locate the following sub-key in the registry, and then click Parameters:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters


3. On the Edit menu, click New, and then add the following registry entry:
Value Name: MaxUserPort
Value Type: DWORD
Value data: 65534
Valid Range: 5000-65534 (decimal)
Default: 0x1388 (5000 decimal)
Description: This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically, ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive. 

 

4. Restart the server afterwards.

 

Or you can reduce the default TIME_WAIT value (120 seconds).

 

To set TcpTimedWaitDelay (TIME_WAIT):

1. Use the regedit command to access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey.

 

2. Create a new REG_DWORD value named TcpTimedWaitDelay.

 

3. Set the value to 60 (unit is second).

 

4. Restart the server.

Attachments

    Outcomes