On Fri, 21 Jul 2017, Tushar Pathare via curl-library wrote:

Thank you for the response, Daniel.

Please switch off digest-mode for the mailing list before trying to keep a conversation on it! We don't want to see you quote a busload of non-related messages and we prefer a mail subject that tells what the thread is about!

What exactly happens with the failing requests? And is there a threshold
somewhere when the errors start to occur?

There is not any specific threshold for the request drop. Not getting any error in the log. Can you suggest few point's where I can add logs for error identification?

libcurl returns error codes for every function and every failed request. You should check those. Unless you overload the target server(s), requests are not expected to fail at all.

Thread has following properties:
 - one epoll fd
 - one multi curl handle
 - 50 HTTP request added in above multi handle.
 - number of iterations

Just make sure that you don't ever use the handles in more than one thread at a time.

If I don't add curl_multi_socket_action() after curl_multi_perform(), then my request are not getting success(epoll_wait() get timedout and not getting any single event). Timeout is very important in my poc. I don't want to wait for all responses if the timeout occurs.

If you want the event-based API then you should *only* use *multi_socket_action() and *not* *multi_perform(). Any mixed use with these in the same transfer loop will cause you unexpected behaviors and you should consider that a flawed program.

I presume that's your biggest problem in your code. If you want to use epoll, use *multi_socket_action(). If you want to use select, use *multi_perform().

libcurl will handle timeouts fine independently of which of these methods you pick.

--

 / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to