cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Felix E. Klee <felix.klee_at_inka.de>
Date: Tue, 7 Feb 2012 14:41:39 +0100

On Tue, Feb 7, 2012 at 1:42 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>> Seems like cURL tries to reuse connections that IIS has already
>> closed.
>
> What makes you believe that?

So far it's just an assumption based on what I've read in the forum
thread I posted before. There people are in charge of the servers, and
at least one solved the problem by increasing the connection timeout
server-side. 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.

> 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 provided a cURL log in my initial post, though that shows only that
there is no server response comming in.

> libcurl has been re-using connections since forever and it generally
> does not create problems.

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:

  don't know if CURLOPT_FRESH_CONNECT will help - helps IIS with cached
  connections.

> I strongly suspect that your problem here is due to the server end or
> because of some stupid equipment between you and the server.

It happens in two entirely different setups: on my local development
system (Ubuntu 11.10) and on an Amazon EC2 server. See my initial post.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-07