curl-library
Re: Using libcurl causes application to stop waking up threads
Date: Mon, 17 Jul 2017 02:26:20 -0400
On 7/10/2017 12:10 PM, sean.donohue_at_panalytical.com wrote:
> I'm using libcurl to post messages to an nginx server using the http
> stream module on an embedded Linux system. Basically, all I'm doing
> now is a curl_easy with "Hello World!" to
> http://localhost/pub?id=chan1. The first time I run curl_easy_perform,
> everything seems to work perfectly: the client application is able to
> read the message from the stream. My application however starts having
> issues. Many of the threads stop waking up for a few minutes but I
> don't see the CPU usage of my application increase from its normal
> level of ~20%. This leads me to believe libcurl is doing something
> with a bunch of system calls that is taking time away from my
> application. Keep in mind I'm running this on a single core 600MHz
> ARM, so I'm not sure if that is enough horsepower to run libcurl. That
> said, I tried changing my application to use system calls to curl
> instead (system("curl -s -v -X POST 'http://localhost/pub?id=chan1'
> <http://localhost/pub?id=chan1%27> -d 'Hello World');) and that works
> perfectly. Is there anything wrong with the way I have libcurl
> configured that could cause this?
Please read the thread safety documentation [1].
[1]: https://curl.haxx.se/libcurl/c/threadsafe.html
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-07-17