cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Randomly no response from IIS, but *only* with cURL

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 8 Feb 2012 09:17:02 +0100 (CET)

On Tue, 7 Feb 2012, Felix E. Klee wrote:

> There people are in charge of the servers, and at least one solved the
> problem by increasing the connection timeout server-side.

That's not necessarily "solving" the problem, that is working around the
sympthom unless you back it up with detailed analysis of what actually
happened in the first place and why it doesn't happen after the change.

> I am in the oposite position, i.e. in charge of the client which uses cURL.
> Setting CURLOPT_FRESH_CONNECT / CURLOPT_FORBID_REUSE to 1 appear to solve
> the problem, at least according to first tests.

It works around the issue, yes, and that might be fine and all but it doesn't
help us to pinpoint exactly where the problem actually lies.

>> You have not provided any logs or hints that this would be the case.
>
> What tool do you suggest for creating a log, and what should I look out for?

I would propopse wireshark and that you monitor the TCP connection curl sends
its request on. See what happens to it once curl has sent the request and
while curl is waiting for the response.

> I provided a cURL log in my initial post, though that shows only that there
> is no server response comming in.

Exactly. But that's just the sympthom of the problem from curl's view. It's
not possible to deduce where this problem actually is based on the lack of the
HTTP response received by curl.

curl uses a TCP connection over which it never sees a response. If there is no
response ever coming back then curl is right and something else is to blame.
If the TCP connection has signalled something that curl should've detected
then there's a curl issue. If there's no signal over TCP and just silence,
then the blame is away from the client and moved over the network and quite
probably to the server if you see this problem from different networks against
the same server.

> Well, searching for IIS and CURLOPT_FRESH_CONNECT shows that other people
> use that option as well when connecting with cURL to IIS. For example
> someone writes:

People posting stuff on internet forums don't quite count as evidence, it
would have to be backed up with details.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-08