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: Curl Multi with easy handle timeout
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: herhor67 via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 29 Apr 2023 17:32:33 +0200
Doesn't matter anymore. I think I found the issue. Failed handles do not increment `received` but before resending them I kept checking if there are any empty slots for the transfers. So when all failed (Im not yet sure if cumulatively or at the same time), they could not be readded anymore.Thank you for your help!Temat: Re: Curl Multi with easy handle timeoutData: 2023-04-28 22:27Nadawca: "herhor67 via curl-library" <curl-library_at_lists.haxx.se>Adresat: "Daniel Stenberg" <daniel_at_haxx.se>; DW: "herhor67" <herhor67_at_interia.pl>; "herhor67 via curl-library" <curl-library_at_lists.haxx.se>;
I will post a thinned out part of the code in an attachment - hopefully it will be available. If this is not too much to ask - I would be greatly grateful :) Its purpose is to run N connections every second - the external API is rate-limited. From what I've seen, usually my counter `(sent-received)` is either equal or very close to `still_alive`. However, on rare occasions, my counter maxes out (equal to `MAX_CONN`) and LibCURL reports 0 running handles. Then it stays like that indefinitely. Temat: Re: Curl Multi with easy handle timeoutData: 2023-04-28 17:10Nadawca: "Daniel Stenberg" <daniel_at_haxx.se>Adresat: "herhor67" <herhor67_at_interia.pl>; DW: "herhor67 via curl-library" <curl-library_at_lists.haxx.se>; > On Fri, 28 Apr 2023, herhor67 wrote:
>
> > it seems that I must have some kind of logic error in my
application.
>
> Make sure you check the return code from all libcurl calls to detect
if it
> returns an error somewhere.
>
> > Does a handle with timeout have some different message/status?
>
> When a timeout triggers, the transfer stops and it returns with an
error. Then
> that transfer will be "delivered" as complete just like any other
transfer
> that completes.
>
> > There seems to only be "CURLMSG_DONE" but maybe somehing in the
`CURLcode
> > result` field?
>
> Yes, result holds a non-zero value for failures.
>
> --
>
> / daniel.haxx.se
> | Commercial curl support up to 24x7 is available!
> | Private help, bug fixes, support, ports, new features
> | https://curl.se/support.html
>
Date: Sat, 29 Apr 2023 17:32:33 +0200
Doesn't matter anymore. I think I found the issue. Failed handles do not increment `received` but before resending them I kept checking if there are any empty slots for the transfers. So when all failed (Im not yet sure if cumulatively or at the same time), they could not be readded anymore.Thank you for your help!Temat: Re: Curl Multi with easy handle timeoutData: 2023-04-28 22:27Nadawca: "herhor67 via curl-library" <curl-library_at_lists.haxx.se>Adresat: "Daniel Stenberg" <daniel_at_haxx.se>; DW: "herhor67" <herhor67_at_interia.pl>; "herhor67 via curl-library" <curl-library_at_lists.haxx.se>;
I will post a thinned out part of the code in an attachment - hopefully it will be available. If this is not too much to ask - I would be greatly grateful :) Its purpose is to run N connections every second - the external API is rate-limited. From what I've seen, usually my counter `(sent-received)` is either equal or very close to `still_alive`. However, on rare occasions, my counter maxes out (equal to `MAX_CONN`) and LibCURL reports 0 running handles. Then it stays like that indefinitely. Temat: Re: Curl Multi with easy handle timeoutData: 2023-04-28 17:10Nadawca: "Daniel Stenberg" <daniel_at_haxx.se>Adresat: "herhor67" <herhor67_at_interia.pl>; DW: "herhor67 via curl-library" <curl-library_at_lists.haxx.se>; > On Fri, 28 Apr 2023, herhor67 wrote:
>
> > it seems that I must have some kind of logic error in my
application.
>
> Make sure you check the return code from all libcurl calls to detect
if it
> returns an error somewhere.
>
> > Does a handle with timeout have some different message/status?
>
> When a timeout triggers, the transfer stops and it returns with an
error. Then
> that transfer will be "delivered" as complete just like any other
transfer
> that completes.
>
> > There seems to only be "CURLMSG_DONE" but maybe somehing in the
`CURLcode
> > result` field?
>
> Yes, result holds a non-zero value for failures.
>
> --
>
> / daniel.haxx.se
> | Commercial curl support up to 24x7 is available!
> | Private help, bug fixes, support, ports, new features
> | https://curl.se/support.html
>
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2023-04-29