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: Tue, 2 Jun 2020 09:08:05 -0700

@Daniel Stenberg <daniel_at_haxx.se> Thank you for the reply.

1. The way I am using cURL and share the pool is via AWS S3 SDK.
Threads are sharing one static "m_curlHandleContainer" that gets created in
my application. And the SDK has its own mechanism to protect from
synchronization issue.
https://github.com/aws/aws-sdk-cpp/blob/master/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp#L498

Do you think this way of sharing connection essentially doing the same as
my previous approach with connection cache sharing (CURLSH)?

2. Yes. I tried disabling the header by setting CURLOPT_EXPECT_100_TIMEOUT_MS
to 0, and the 100-continue did not occur. I am just not sure if this is
going to cause any side effect, even though I have not seen any yet.

3. Yes. I am trying to provide an example code excluding the AWS S3 SDK
that can reproduce the symptom. I am a bit new to cURL, so this may take
some time.

Thanks again for your help!

Best,

On Mon, Jun 1, 2020 at 11:44 PM Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Mon, 1 Jun 2020, Leo Song wrote:
>
> > 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.
>
> How does it share this pool? I will again point to
> https://github.com/curl/curl/issues/4915
>
> > 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.
>
> That seems pointless. Why not disable the header completely instead?
>
> > 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"
>
> Then you better explain clearly and with details what you did. Maybe share
> an
> example code that can reproduce?
>
> --
>
> / 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