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

curl-and-php

Problems with curl timeout setting

From: <127546_at_sms13.de>
Date: Sun, 23 Jan 2011 22:30:25 +0100

Hello

 I am using curl in php 5.3.3 on RHEL5.4 with the following settings

     $conn[$i] = curl_init($url[1]);
     curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($conn[$i], CURLOPT_NOSIGNAL, 1);
     curl_setopt($conn[$i], CURLOPT_NOPROGRESS, 1);
     curl_setopt($conn[$i], CURLOPT_FAILONERROR, 1);
     curl_setopt($conn[$i], CURLOPT_URL, $url[1]);
     curl_setopt($conn[$i], CURLOPT_USERAGENT, $agent);
     curl_setopt($conn[$i], CURLOPT_HTTPHEADER, $header);
     curl_setopt($conn[$i], CURLOPT_SSL_VERIFYPEER, 0);
     curl_setopt($conn[$i], CURLOPT_FOLLOWLOCATION, 1);
     curl_setopt($conn[$i], CURLOPT_MAXREDIRS, 1);
     curl_setopt($conn[$i], CURLOPT_REFERER, $referer);
     curl_setopt($conn[$i], CURLOPT_DNS_USE_GLOBAL_CACHE, 1);

and the following timeout settings
    curl_setopt($conn[$i],CURLOPT_CONNECTTIMEOUT_MS,300);
    curl_setopt($conn[$i],CURLOPT_TIMEOUT_MS,2000);

Even though the timeout setting is 2000ms I am receiving the following message::

Operation timed out after 2928 milliseconds with 0 bytes received

any help on this would be appreciated, we are fighting with this for months, literally :)

ps. we are connecting through IP, not domain, so dns is not at fault here

-- 
Best regards,
 127546                          mailto:127546_at_sms13.de
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2011-01-23