> On Fri, Nov 19, 2010 at 3:24 AM, Dan Fandrich <[email protected]> wrote:
> The values must be longs, not int. Try using 1L and 100L as your values. > What is libcurl doing when the timeout occurs? libcurl is waiting for the data from HTTP server, here is the output from CURLOPT_VERBOSE, Between Accept: */* and <HTTP/1.1 200 OK its waits for 60 seconds only even when CURLOPT_TIMEOUT is set to 100L or 80L or 101L etc. [arn...@dune CBL]$ ./BC.out Fri Nov 19 10:15:53 2010: [LOG_DEBG]: Started Thread * About to connect() to localhost port 80 * Trying 127.0.0.1... * connected * Connected to localhost (127.0.0.1) port 80 > GET /recv_data_after_one_min.php HTTP/1.1 Host: localhost Accept: */* < HTTP/1.1 200 OK < Date: Fri, 19 Nov 2010 04:45:53 GMT < Server: Apache/2.2.3 (CentOS) < X-Powered-By: PHP/5.1.6 < Content-Length: 0 < Connection: close < Content-Type: text/html; charset=UTF-8 * Closing connection #0 > If it's timing out in the > DNS lookup, then the DNS resolver you're using becomes an issue. What > happens if you increase or decrease the value from 100? Does the 60 > second timeout change? I tried chaning the values (with a L in the end for long) but result is same. DNS lookups I don't know because connection is already made, only data transfer is taking place. I have configured the php application to wait for 60 sec before sending data when a request is made by libcurl, if I configure it to send data immediatly as soon as request is made then libcurl receives data without any problems, so I don't think DNS lookup is the issue here. -- http://uttre.wordpress.com/2008/05/14/the-lost-love-of-mine/ ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
