cURL / Mailing Lists / curl-library / Single Mail

curl-library

reply to all: CURLE_OPERATION_TIMEDOUT when FTP upload with large files

From: A-ZYSTEMS <info_at_azystems.de>
Date: Tue, 2 Jun 2009 17:30:49 +0200

 
Sorry I am a beginner with libcurl

I must only insert curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION,
SO_KEEPALIVE)?

My Programm are going to use on a lot of different pc with LAN, WLAN etc. I
have try 3 different FTP-Server by different Webhoster.
By all I have the same problem, when I upload a big file (more as 40 MB)
curl_easy_perform return a CURLE_OPERATION_TIMEDOUT after the upload.

Actually I ignore CURLE_OPERATION_TIMEDOUT return from "curl_easy_perform",
because my uploaded files are all ok. But that is not a nice solution,
because the user must wait one minute after the upload until
curl_easy_perform return with CURLE_OPERATION_TIMEDOUT;

> When I upload a file less as 40 MB, i have no problems. When I load a
> bigger file (for example 56 MB) "curl_easy_perform" return a
> CURLE_OPERATION_TIMEDOUT. But the uploaded file is complete save on
> the ftp-Server.

>It sounds like the typical case of the control connection having timed-out
(through a firewall or NAT) by the time the data
> connection is complete. The only sensible thing you can do to fix that
problem is to extend the timeouts.

When I extend the timeouts with CURLOPT_TIMEOUT
Or CURLOPT_FTP_RESPONSE_TIMEOUT to 3 Hours for example, curl_easy_perform
hang for 3 ours.

My Program is a photo book application. After creating a photo book, the
photo book should uploaded to a backend Server.
A photo book can have 1 MB to 300 MB and more. Files with to 20 minutes
uploadtime, i have no problem. But a file with a upload time over 30
minutes, "curl_easy_perform" need over one minutes to finish the upload
porccess with CURLE_OPERATION_TIMEDOUT.

Alexander
Received on 2009-06-02