FTP Server TCP/IP Port Exhaustion Prevention

TCP/IP Port Exhaustion Prevention affects FTP servers and other services using the TCP stack as well. In the case where a lot of TCP links are created and closed very quickly, as is the case in most web and FTP servers, you should change the following two system settings to prevent port exhaustion during peak traffic hours.

How to Offer Additional Ports to the TCP Driver

Add or edit the following DWORD entry to the registry of your backup clients as well as FTP servers. The default is 5000, which leads to the port range of 1024 to 5000.
You could MaxUserPort up to 65535
THe key is:

HKEY_LM\System\CurrentControlSet\Services\Tcpip\Parameters\MaxUserPort = 65000

Please reboot after setting this setting.

Clearing Used Ports Earlier

It takes some time before Windows removes the port entirely after it’s closed. It will be stuck in “TIME_WAIT” or “CLOSE_WAIT” for quite some time, but that period can be changed in the registry.

Add or edit the following DWORD entry to the registry of your backup clients as well as FTP servers. The default is 120 = 2 minutes.
You reduce the value of TcpTimedWaitDelay down to 1 but it’s probably wise to set it slightly higher in most environments.

HKEY_LM\System\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay = 5

Please reboot after setting this setting.

The above two changes followed by a reboot will greatly increase the number of FTP transactions your FTP server and client can handle per minute. The first setting gives more ports to TCP to use and the second ensures the ports are recycled as quickly as possible.

BackupChain Overview

The Best Backup Software in 2020
Download BackupChain®

The all-in-one Backup Solution for
Disk Image Backup
Drive Cloning and Disk Copy
Hyper-V Backup and VHD File Backups
VirtualBox Backup and VDI File Backups
VMware Backup and VMDK Backups
FTP Backup and Secure FTPS Backups
Cloud Backup and Remote Backups
File Server Backup and Data Backups

Popular

Resources