I have been scratching my head over this one for months, and cannot make any sense of it. It is happening not just to me, but others confirm the same thing happens to them. There mat be some logs I need to check, or tools I need to use to trace what is happening, but I really don't know where to direct that effort. This is the problem:

At my office, connecting to a remote FTP site takes 20-30 seconds to connect. Once connected, the speed is great. If the FTP client times out, then it takes another 20-30 seconds to reconnect.

Once connected to a server, I can open additional FTP connections, and they connect instantly - there is no delay. That is, until the client times out through non-use and needs to reconnect again.

If I connect using my client, it takes 20-30 seconds. I can then close the client down completely, and open a new instance. That connects immediately. If I wait a few minutes before attempting to connect, then I get that slow initial connect again.

This does not happen at home, with my same laptop. The office connection is a Virgin cable Superhub V1, running DHCP and being provided with a fixed public IP. I have a mail and file server on a DMZ on the inside of the network, but traffic does not pass through that server.

At home I use Virgin cable with the Superhub V2 in passthro/routher mode. An SME Server sits on that, and all traffic passes through that server, which acts as firewall, router, internal DHCP etc.

Other workers have other home Internet connections, different OSes and clients, and see the same thing (e.g. OS-X with its built-in client).

What could be causing this? Are there logs on the remote servers I am FTPing to that would tell me what could be happening? Can the protocol be monitored while connecting to see what could be the problem?

Sorry if this is the wrong place to ask this. It kind of crosses right over networks, servers and development tools.

Edit: ssh connections to the same servers is instant - never a delay there.

Looking at the messages log, this appears after some time of FTP inactivity, indicating it is probably my client that closes the connection:

proftpd: server-ip (my-ip[my-ip]) - Client session idle timeout, disconnected
proftpd: server-ip (my-ip[my-ip]) - FTP session closed.

Then this appears in the log when connection to FTP again, immediately after the 20 second delay and the client indicating that it has connected:

xinetd START: ftp pid=15055 from=::ffff:my-ip
www proftpd[15055]: server-ip (my-ip[my-ip]) - mod_tls/2.6: no TLSRSACertificateFile, TLSDSACertificateFile, TLSECCertificateFile or TLSPKCS12File configured; unable to handle SSL/TLS connections
www proftpd: server-ip (my-ip[my-ip]) - FTP session opened.

(IP addresses replaced with my-ip and server-ip)

  • What port do you use on the ftp server? Also, what mode do you use: passive or active?
    – Papa
    Aug 13 '14 at 10:15
  • I'm using the standard FTP port, and passive mode. I'll see if there is a more secure protocol we can use, and if the problem goes away with that.
    – Jason
    Aug 13 '14 at 10:37
  • Could it be related to DNS, if the server tries to find the reverse DNS of the client connecting? Aug 13 '14 at 10:51
  • Do you use an IP or FQDN as the server address?
    – Papa
    Aug 13 '14 at 10:57
  • I'm using both IP and FQDN on the various accounts on the servers. Both have the same problem. When we run WordPress updates on those servers, that involves WordPress doing an FTP callback to itself - there is no delay there.
    – Jason
    Aug 13 '14 at 11:05

The most frequent causes for login delays with proftpd are:

  1. Reverse DNS resolution of client IP (disabled via UseReverseDNS off)
  2. RFC1918 lookups (disabled via IdentLookup off)
  3. Timing delays added via mod_delay (disabled via DelayEngine off)

Hopefully one of these tweaks will help!

  • Thanks - I'll take a look through these and report back. At the moment I am avoiding the problem using a 60-second keep-alive ping in the FTP client. When I connect first time opening the client, it connects instantly. It is only after the connection gets dropped that it takes a while to reconnect. At the office we don't (knowingly!) use an FTP proxy, but I am wondering if the gateway server we use (SME Server distro) is somehow getting in the way.
    – Jason
    Jan 23 '16 at 11:59

Try to use PASSIVE mode, this problem may caused by proxy.

  • The client is set to passive mode already. At home, I have the proxy turned off on the SME Server. At the office we connect direct to the cable modem, and have the SME Server on a DMZ, but nothing passed through it. That's not to say that the ISP is not providing some kind of proxy.
    – Jason
    Aug 13 '14 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.