curl-and-php
RE: Time-out changed?
Date: Thu, 13 Mar 2008 08:40:28 -0400
Thanks for your reply. If I interpret correctly, it means I shouldn't
have to worry about the CONNECTTIMEOUT setting - when the time defined
by the TIMEOUT setting is exceeded, even during the connecting phase, it
should abort the entire request.
I don't think I have anything to say about the DNS server (can I direct
cURL to go elsewhere for DNS?), so I have to live with its occasional
slipups. Note that most requests go through just fine - it's just that
it's quite disruptive for a single request to hang up the entire process
for several minutes.
I should have mentioned in my initial message that I'm using the
curl-multi functions
Rob
________________________________
From: curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] On Behalf Of YupLounge
website analyse en optimalisatie
Sent: Thursday, March 13, 2008 8:25 AM
To: 'curl with PHP'
Subject: RE: Time-out changed?
Maybe there is a problem with the DNS server. You say it yourself: "cURL
name lookup error"
http://curl.haxx.se/mail/lib-2004-01/0165.html or your other question
CURLOPT_CONNECTTIMEOUT sets a timeout for the "connect phase", which
means
that if the timeout doesn't happen until curl has connected, it will not
time
out anything.
CURLOPT_TIMEOUT sets a timeout for the entire transfer, so if the
transfer is
still in progress when the timer times out, the the transfer is aborted.
Willem
________________________________
Van: curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] Namens Broekhuis,Robert R.
Verzonden: donderdag 13 maart 2008 12:55
Aan: curl-and-php_at_cool.haxx.se
Onderwerp: Time-out changed?
My hosting provider recently upgraded their server (new system details:
PHP Version 5.2.5, libcurl/7.15.5 OpenSSL/0.9.8c zlib/1.2.3
libidn/0.6.5). Since then, some of my script are having trouble,
apparently because requests for URLs that are available don't time out
as they did before. In my scripts I define
curl_setopt($ch,CURLOPT_TIMEOUT,30);
But I now find requests going for minutes without timing out, eventually
returning a cURL name lookup error. Did the timeout behavior change? (I
don't know what my previous libcurl version was, unfortunately)
I notice there is also the CURLOPT_CONNECTTIMEOUT setting - how exactly
does this differ from the general TIMEOUT setting?
Thanks for any help!
Rob
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-03-13