Re: How to fix libcurl error(easy handled already used in multi handle) ?
Date: Wed, 13 Feb 2019 07:54:20 -0500
On Tue, Feb 12, 2019 at 06:49:17AM -0800, kishore koney via curl-library wrote:
> Thanks Daniel.
> I am not pretty sure when you said " you're adding one of those handles
> twice." What does it mean ?
> All that I am using is curl_easy_init(), curl_easy_perform(), curl_easy_cleanup
Your original email mentions multiple threads. Are you trying to use a
single easy handle across all of the threads, or are you calling
init+perform for each thread? The former scenario would have a high
likelihood of encountering the error you describe.
> I am getting the error(easy handled already used in multi handle) when I called
> curl_easy_init() followed by curl_easy_perform ? Which of these API is adding
> handles twice to ???
> thanks, krishna
> On Mon, Feb 11, 2019 at 10:48 AM Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 11 Feb 2019, kishore koney via curl-library wrote:
> > I am using *libcurl(version = 7.61.1*]*)* easy API for downloading http
> > url/files(as byte-range chunks). I am getting libcurl_easy_perform()
> > error_code(*2*) and errorBuffer((*easy handled already used in multi
> > handle*). I am opening 10 concurrent active libcurl easy handles as part
> > 10 threads in a process. Is that OK ?
> Sure, that's fine. But since this error occurs, it sounds as if you're
> one of those handles twice.
> > Is there any limit on how many concurrent libcurl easy
> > handles(libcurl_easy_init) a process can keep active at a time ?
> No. Although you might run into problems when reaching the maximum number
> open file descriptors you can have in a process, which typically defaults
> > *I do not get this error all the time but once in a while(1 out of 10
> > handles). Are there any tips on handling this error ? What context will
> > raise this error ?*
> It explains itself: when you try to add a handle to a multi handle that
> already is added to a multi handle.
> > Are there any libcurl usergroups/forums where I can post my libcurl
> > ?
> I would say that this is the most suitable one.
> / daniel.haxx.se
Received on 2019-02-13