cURL / Mailing Lists / curl-library / Single Mail


Re: Timeout; x out of -1 bytes received

From: Dan Fandrich <>
Date: Mon, 18 Mar 2013 21:25:14 +0100

On Mon, Mar 18, 2013 at 10:40:06AM +0100, Daniel Walter wrote:
> i am using libcurl in my c/c++ projects for a while and I like it a lot.
> In my latest project I have at least 2 threads. 1 thread performs
> many multi actions. the other thread sometimes makes some normal easy
> calls. Each thread uses its own easy handles. Nothing is shared
> between the threads. But all requests go to the same server (e.g.
> Sometimes the easy actions don't finish well. I get an error like that:
> "* Operation timed out after 10570 milliseconds with 59283 out of -1
> bytes received"
> This does not happen always.
> In the easy handle I specify my own CURLOPT_WRITEFUNCTION and set
> CURLOPT_TIMEOUT. If i dont set CURLOPT_TIMEOUT the easy action hangs
> "forever".

What do you see when you trace the connection with Wireshark? Does the server
actually send some data in this case, or is libcurl simply waiting for data
that never arrives? i.e. what makes you think it's not a server problem?

>>> Dan
List admin:
Received on 2013-03-18