Tools

Large file transfers abort after XX minutes without completing in Serv-U

This article provides information on the issue where a file transfer process aborts after xx minutes when setting up a secure IIS website using Microsoft's high security web hosting template.

First published date

10/26/2018 7:19 PM

Last published date

5/11/2020 8:49 PM

Overview

Using Microsoft's high-security web hosting template for setting up a secure IIS website may experience problems with large file transfers. Large file transfers usually abort after several minutes, even if they are active. 

The cause of the problem is a change made in the template to the registry, which sets an idle timeout for the TCP connections. The FTP protocol uses two connections. There is a command connection for issuing instructions to the server. Each time a data transfer completes, it establishes a separate data connection. While on a data transfer, the command connection is idle, which causes disconnection. 

When the registry's idle timeout is reached, it also triggers the command disconnection, which disrupts any ongoing data transfer for any session as per the FTP standard.

The following is the registry key involved.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveTime 

The default is not to have the KeepAliveTime key at all, the template adds this. If a timeout is desired, make sure the value is sufficiently large to accommodate all file transfers (the value is in [ms]). Alternatively, an FTP client that periodically sends a command to the server during file transfers will also prevent the command connection from aborting.

Product section

Serv-U Managed File Transfer & Serv-U FTP Server

Cause

The cause of the problem is a change made in the template to the registry, which sets an idle timeout for the TCP connections.

Resolution

1. Click Start, then click Run, and then type regedit in the Open box.
2. Locate the following registry sub-key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
3. Highlight the Parameters sub-key.
4. Create KeepAliveTime registry key as follows:
5. Click on the Edit menu, then New > DWORD Value.
6. Type the name of the new registry value (i.e. "KeepAliveTime").
7. Right click on the new registry value and click 'Modify'.
8. Set Base to Decimal.
9. Set the value data to the desired value (i.e. '7200000' - time in milliseconds.
10. Click OK.
11. Reboot the server.