curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: "Connection is still name resolving, can't reuse" error

From: Leo Song via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 1 Jun 2020 19:05:39 -0700

@Daniel Stenberg <daniel_at_haxx.se> Thanks for the reply.
Instead of connection cache, I have implemented a custom class that allows
multiple threads to share the connection pool, it seems working OK except a
few thing.
With this new change, I am now starting to get "Expect: 100-continue",
which makes it wait for a server response for 1 second. This slows down my
application, so I've set CURLOPT_EXPECT_100_TIMEOUT_MS to 1ms.
With this change, my application became almost as fast as before, but I am
not sure if 1ms is desirable. The request is eventually made without error,
and received 200 OK though.

I am sure my new change with the connection pool is causing this
100-continue because without this change, no 100-continue occurred.
However, I have been struggling to pinpoint why/what is really causing this
"100-continue", so
I will very much appreciate if you can provide any help!

Here is the sanitized log that shows connections are being shared, and gets
100-continue.

...
Curl text: Re-using existing connection! (#0) with host MY_CONN
Curl text: Connected to MY_CONN (#0)
Curl header out: PUT /Test_0 HTTP/1.1
Host:
Accept: */*
authorization:
content-length: 1024
content-type:
user-agent:
x-amz-content-sha256: UNSIGNED-PAYLOAD
x-amz-date:
Expect: 100-continue
Curl text: Done waiting for 100-continue
Curl text: Mark bundle as not supporting multiuse
Curl header in: HTTP/1.1 200 OK
...
Curl text: Connection #0 to host MY_CONN left intact

Best,

On Mon, May 11, 2020 at 1:24 AM Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Fri, 8 May 2020, Leo Song via curl-library wrote:
>
> > I am trying to use the share interface to share connection among
> threads,
> > and keep encountering " Connection # is still name resolving, can't
> reuse"
> > error.
>
> I'm sorry, but right now you should disable connection cache sharing
> between
> threads. It's too buggy. See https://github.com/curl/curl/issues/4915 for
> details.
>
> To make it worse: fixing it requires a larger take and I've not yet been
> able
> to muster the time and energy to adress it. :-/
>
> --
>
> / daniel.haxx.se | Commercial curl support up to 24x7 is available!
> | Private help, bug fixes, support, ports, new features
> | https://www.wolfssl.com/contact/
>

-- 
Best regards,
Kyung Joon Song.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-06-02