cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: curl_exec() dies intermittently

From: Richard Draucker <rd_at_traceli.com>
Date: Thu, 6 Sep 2007 11:21:51 -0500

From phpinfo...

libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6

The process...
My browser connects to a curl application running remotely on Apache.
Curl then connects to a remote server, retrieves web pages and does some processing eventually returning a completion code to my browser. In most cases this takes 0.5 to 3 seconds.

I thought my browser connection might be timing out before curl completes its tasks, causing the curl application to terminate. But under the Apache section, phpinfo() shows my Apache timeout as...

Timeouts Connection: 120 - Keep-Alive: 15

Thanks,
Richard

On Thu, 6 Sep 2007 15:02:42 +0200 (CEST)
Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 6 Sep 2007, Richard Draucker wrote:
>
> > My application repeatedly requests pages from a given site. Some sites work
> > just fine. Others, however, intermittently hang while executing
> > curl_exec().
>
> The subject says "dies" and this says "hang". I take it hang is the word you
> wanted to use?
>
> > Any suggestions as to how to prevent curl_exec() from hanging or how to make
> > CURLOPT_TIMEOUT force a return after the specified time period?
>
> What libcurl version is this? libcurl is supposed to always return no sooner
> than the given timeout time...
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

-- 
Richard Draucker <rd_at_traceli.com>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-09-06