Click here to Skip to main content
15,610,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there

I have an issue I would love some help with please.

I am writing an app which sends a database held on the PC to a server. The app is written in and the server uses Filezilla. There are approx. 380 files to transfer, mostly all small text files of 1-5kb in size. I estimate it should take a few seconds.

Everything works fine, except that when doing a transfer, approx 50 files are transferred in a burst and then the FTP just goes to sleep for 15 seconds... then it wakes up, sends another 50 files and then goes to sleep for another 15 seconds... This continues until all files have been sent. Each time it bursts, it send the 50 files in under a second and I can confirm that they are happily received in the receiving directory. The 'sleep' time is almost always exactly 15 seconds, which make me think it is some timeout issue or some simple setting I am getting wrong. The whole process is taking approx. 2 mins.

What I have tried:

I have written various test methods to try to find out where the issue is and I have found that with even the most basic FTP upload, the same issue is there. I wrote a recursive loop doing nothing but sending 350 small text files to my Filezilla server via FTP and this had exactly the same issue. I have tried both syncronous and asyncronous FTP transfers but it makes no difference.

Can anyone shed any light on this please? I am running out of ideas.

Updated 9-Jul-20 1:17am

I always thought (maybe incorrectly but anecdotally) FTP was a 'network greedy' protocol - and at some stage your going to hit max traffic with small files.

I wonder if it would be better if you sent larger aggregations of files - re-zip into batches of a different size OR have you considered trying SSH - I used to deploy production software from Sydney to servers in a UK cluster, SSH on windows was supreme in its performance
Share this answer
This may be by design at the server; hosts can and do place limits or throttle the services.
One major consideration is the maximum number of connections your destination will allow. Many (nearly all?) sizable FTP sites will either have a hard set maximum number of connections a single user can have and/or will temporarily lock your account if you have more than a hard set number of connections. For instance we have found that when FTP’ing to GoDaddy’s old Linux ‘grid’ it chokes at about 8 connections.
SOLVED: What is The Optimal Number of Simultaneous Transfers on an FTP Client Like FileZilla – Up & Running Technologies, Tech How To's[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900