cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl Error 18 Timeout

From: Matt Horrocks <matt.polyvisual_at_gmail.com>
Date: Sat, 4 Dec 2010 10:59:33 +0000

On Sat, Dec 4, 2010 at 10:04 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Sat, 4 Dec 2010, Matt Horrocks wrote:
>
> I'm using curl 7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k
>> zlib/1.2.3.3 libidn/1.15
>>
>> Approximately 1 in 50 transfers will result in an error 18:
>> CURLE_PARTIAL_FILE failure. (This is OK, as I can log the failure and url
>> and try it again later).
>>
>> The problem is with a timeout... when this error 18 occurs, the CURL
>> transfer hangs for 3 minutes before failing.
>>
>> Is there a way to shorten this timeout?
>>
>
> What timeout is this? What protocol are you using here?
>
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

It's http, through the PHP Curl library.

I don't know what timeout it is... I assume it's adding one, as every curl
request which fails with an error 18 hangs for 3 minutes. The only timeout
I've set is the connecttimeout below.

curl_setopt($i1, CURLOPT_PROXYUSERPWD, $proxylogin);
curl_setopt($i1, CURLOPT_URL, $url);
curl_setopt($i1, CURLOPT_HEADER, 1);
curl_setopt($i1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($i1, CURLOPT_PROXY, $proxy);
curl_setopt($i1, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($i1, CURLOPT_REFERER, $referrer);
curl_setopt($i1, CURLOPT_USERAGENT, $agent);

Thanks,
Matt

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-12-04