Workaround: Azure IoT Python SDK Error: curl_easy_perform() failed: Out of memory

A bunch of people have reported the following issue with the Azure IoT Python SDK:

azure-iot-sdk-python/c/c-utility/adapters/httpapi_curl.c Func:HTTPAPI_ExecuteRequest Line:552 curl_easy_perform() failed: Out of memory

Here’s a workaround:

Please do not go to production with this workaround as it has not been fully tested. The Azure IoT team will release a permanent fix soon.


From the Python Dev Box Setup Page you’ll get to the “Compile the Python Modules” step. Right after you run ./, you’ll need to remove openssl and replace it with gnutls

cd build_all/linux


sudo apt remove libcurl4-openssl-dev
sudo apt install libcurl4-gnutls-dev


You will then be able to run any of the samples by following the instructions here.


We don’t have a workaround at this time. A permanent fix should be rolled out soon. Please let me know if you find a workaround to swap out openssl for gnutls.

Tracking Issues