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

curl-and-php

Re: unresponsive dns server and curl multi timeouts not working

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 3 Jun 2008 18:42:18 +0200 (CEST)

On Tue, 3 Jun 2008, Dylan DePrenger wrote:

> We have had some times where a site that we pull information has had dns
> server become unresponsive.
>
> When this happens the timeouts set in curl (php bindings) do not work as
> expected.
>
> It times out after 1min 14 sec with "Could not resolve host: www.yahoo.com
> (Domain name not found)"

but...

> do {
> curl_multi_exec($mh,$running);
> while ( FALSE !==($msg = curl_multi_info_read($mh)) ) {
> // print "ding ". $msg['handle'] ."\n";
> }
> } while ($running > 0);

... wasn't your code still spinning like crazy in this loop during those 74
seconds? I mean, why don't you abort it after whatever time you see fit?

Note also that this loop busyloops, which is considered very bad programming.

But no, I'm not sure what this isn't timed-out the way you want, but I don't
consider the timeout options terrible important in the multi interface since
you can easily just stop the operation yourself at any time.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-06-03