cURL / Mailing Lists / curl-library / Single Mail

curl-library

ftp upload fails when time is greater than 10 minutes

From: Eric <crc1021_at_myrealbox.com>
Date: Tue, 22 Apr 2008 11:57:59 -0500

When doing an ftp upload of 50 meg files that takes more than 10 minutes, the library reports a failure. The whole file is transferred, but errors out immediately after.

It seems like it does not wait for the 226 response. Immediately after the debug output of "Remembering we are in dir", it sends "FTP response reading failed" with no time delay between the two messages.

Files which take less than 10 minute do not show this issue. I tried it with the curl.exe it it showed the same behavior as my code that uses libcurl. Other FTP clients can upload the larger files to the server without issue.

I tried setting CURLOPT_TIMEOUT to 3600, but I saw no change.

I'm using a mingw build of version 7.18.0, debug output is listed below.

< 220 ProFTPD 1.2.10 Server (ProFTPD Default Installation) [192.168.1.2]
> USER user
< 331 Password required for user.
> PASS password
< 230 User user logged in.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> TYPE I
< 200 Type set to I
> SIZE abc.txt.$$$
< 550 abc.txt.$$$: No such file or directory
> REST 0
< 350 Restarting at 0. Send STORE or RETRIEVE to initiate transfer
* Remembering we are in dir ""
* Connection #0 to host example.com left intact
* Re-using existing connection! (#0) with host example.com
* Connected to example.com (xx.xxx.xxx.xxx) port 21 (#0)
* Request has same path as previous transfer
> EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||60076|)
* Trying xx.xxx.xxx.xxx... * connected
* Connecting to xx.xxx.xxx.xxx (xx.xxx.xxx.xxx) port 60076
> STOR abc.txt.$$$
< 150 Opening BINARY mode data connection for abc.txt.$$$
* Remembering we are in dir ""
* FTP response reading failed
* Connection #0 to host example.com left intact
* Failure when receiving data from the peer
* Send failure: Connection was reset
* Closing connection #0
Received on 2008-04-22