File timeout exceeded.

0 votes
asked Nov 24, 2010 by Shamresh Khan (120 points)
edited May 10, 2013


We are using version 2.5.3009.0 of Rebex.Ftp.Net.dll.

We have found that for large transfers (200+ MB mov files) we occasionally get a "Timeout exceeded" exception. This does not occur all the time. This occurs on the Ftp.Put() command and it can occur at different points in the file transfer.

Is there a property that needs to be set to increase the timeout?


Applies to: Rebex FTP/SSL
commented Nov 24, 2010 by Shamresh Khan (120 points)
Once the failure has occurred, using another FTP client (fireZilla for example), the ftp goes through.
commented Nov 24, 2010 by Shamresh Khan (120 points)
I am looking through the logs I created and most of the failures occurs on exactly 50 mins of the ftp.Put(). Although some failures on the same file occurred on 25 mins and 45 mins from the start of the put command.
commented Nov 24, 2010 by Shamresh Khan (120 points)
Further to my last comment, failure on 50 mins is the initial problem. The other timeout periods may be a consequence of our FTP server behaving incorrectly after the first failure.

1 Answer

0 votes
answered Nov 24, 2010 by Lukas Pokorny (128,250 points)
edited May 10, 2013

I'm not 100% certain yet, but this seems to resemble an issue our clients encounter once in a while. Some badly behaved firewalls or routers silently close the main FTP connection while a data transfer is in progress because of inactivity - even though the main FTP connection is actually supposed to be inactive while the transfer is in progress (it uses a separate TCP connection).

Rebex FTP includes a workaround for this issue, but it doesn't work reliably with all FTP servers so it's disabled by default. To enable it, use this code:

client.Options |= FtpOptions.KeepAliveDuringTransfer; // C#

client.Options = client.Options Or FtpOptions.KeepAliveDuringTransfer ' VB.NET

This will cause a dummy NOOP command to be sent every 600 seconds (10 minutes) - you can also specify a longer interval by changing the value of Ftp object's KeepAliveDuringTransferInterval property.

Does enabling this option help?

commented May 10, 2013 by Jan Sotola (17,670 points)
edited May 10, 2013