curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: How to do optimal FTP upload for multiple files?

From: Daniel Jeliński via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 18 Jul 2019 09:04:14 +0200

Taras,
Thanks for pointing that out. The function looks good.

Buffer autotuning was only introduced in curl 7.61, so the app using
7.57 will use the default (slow) buffer sizes. You shouldn't need to
set UPLOAD_BUFFERSIZE to get good upload speeds on 7.65.1.

As for the connection timeout, it appears to be a well known problem
with FTP on slow connections with oversized buffers. I just found a 10
year old message describing what looks like the same problem:
https://curl.haxx.se/mail/archive-2009-08/0060.html

I checked your upload_failure log, specifically the connection logged
under T#12216. This connection appears to have ~100ms RTT, throughput
~5KB per RTT (50KB/s), for which the default 16KB buffer looks like
overkill. In that environment sending the last ~700KB buffer would
take about 15 seconds; curl timed out after 10. So yes, this problem
was indeed caused by oversized UPLOAD_BUFFERSIZE.

Back to slowness topic, can you reproduce the slow uploads using curl
binary version 7.61 or newer?
Regards,
Daniel
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-07-18