Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.2k views
in .NET FTP by (1.8k points)
Hi,

Currently I'm using the brand new BeginGetFileInfos(pathToDir, recursiveBool) method for a rather large amount of files (60k+) in a tree structure of maximum 4 levels deep.
Everything runs smooth when I use this method on a small amount of data, but when used on the real thing, it seems I always get a time-out around 20 minutes in process.
"421 Connection timed out - closing." is what it says in the log file.
As I understand this is a problem of the ftp server, not the library, yet still this is the situation and the program should be capable of handling this.
I already tried using the .Timeout = 300000 call prior to the method call, but this seems to help me nothing.
Would increasing it even more be helpfull?

My questions are the following:
How can I find out what exactly is causing this error (network failure, server rules, server failure ...)
What can be done to prevent this
What can be done to recover from such an error

Currently when the method fails, I can only try listing from scratch again. This will most likely result in exactly the same error all over again.

I posted this on the forum and not in the mail because I figured this is a problem others could face too in the future.

2 Answers

0 votes
by (161k points)
This is most likely the FTP problem of running out of TCP ports (google TIME_WAIT and you'll find plenty of references).

This is already catered for with *most* of our recursive methods by the MultiTransferCountBeforeSleep, MultiTransferSleepEnabled, and MultiTransferSleepTime. Setting these properties puts sleeps in that permit the OS to reclaim the sockets before running out.

Unfortunately we haven't enabled these for the new GetFileInfos. We'll do so and send you a DLL to try out.
0 votes
by (1.8k points)
That would be nice :)

Categories

...