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: How to diagnose the issue

From: Ray Satiro via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 24 Mar 2022 23:56:58 -0400

On 3/24/2022 2:11 PM, Shawn Cao via curl-library wrote:
> I'm using curl lib in my C++ application, running on a Mac laptop,
> here is what I saw, and looking for help on how to diagnose the root
> cause. 
>
> *Version:* curl 7.79.1 (x86_64-apple-darwin21.0) libcurl/7.79.1
> (SecureTransport) LibreSSL/3.3.5 zlib/1.2.11 nghttp2/1.45.1
> Release-Date: 2021-09-22
> *OS: *Apple M1* *MacBook Pro (13-inch, M1, 2020)
> *Code: *https://github.com/varchar-io/nebula/blob/master/src/storage/http/Http.cpp
> *Issue Observed:  *
> After the application starts (on my laptop), everything looks fine,
> running pretty reliable. 
> After some time (not sure how long, at least a few hours, or the
> laptop may sleep and wake up during the time), "curl_easy_perform"
> starts to return CODE 28 (operation_timeout), so I added some debug
> info through "curl_easy_getinfo"
> Here are some values printed when it fails:
> E0324 11:08:01.650840 1882091520 Http.cpp:189] Failed to read URL:
> https://api.rs2.usw2.rockset.com/v1/orgs/self/ws/commons/lambdas/TweetsBetween/tags/latest;
> Code=28
> I0324 11:08:01.650871 1882091520 Http.cpp:141] [Curl-Info]: response
> code=0, error number=0, time=(total=299.999, dns=0.018542, conn=0,
> app-conn=0), num-conn=0, ssl-verify=0, download-size=0,
> url=https://api.rs2.usw2.rockset.com/v1/orgs/self/ws/commons/lambdas/TweetsBetween/tags/latest
>
> If I restart the application from this point, it starts working well
> again. How do I diagnose this issue? Appreciate your input!


Describe how the application uses libcurl. The application makes
continual transfers? And then at some point those transfers timeout
repeatedly but will work again if you restart the application? Enable
CURLOPT_VERBOSE. [1] There is probably some network interruption.


[1}: https://curl.se/libcurl/c/CURLOPT_VERBOSE.html


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-03-25