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: 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)