[ESP-IDF 5.4.1] HTTPS download errors + esp_tls_conn_read error

matheusQuadros
Posts: 2
Joined: Fri May 16, 2025 12:01 pm

[ESP-IDF 5.4.1] HTTPS download errors + esp_tls_conn_read error

Postby matheusQuadros » Fri May 16, 2025 2:04 pm

Hi,

After migrating from ESP-IDF 4.3.4 to 5.4.1, my HTTPS download using esp_http_client became extremely slow, and I’m now getting this error:

Code: Select all

E (...) transport_base: esp_tls_conn_read error, errno=No more processes
On 4.3.4, the same file (around 1.5 MB) downloaded in ~3 minutes. Now it takes way more time and most times I can’t finish the download at all due to the error above.

I'm using PSRAM and HTTP_TRANSPORT_OVER_SSL. Free heap seems fine, and I already tried increasing buffer sizes.

Has anything changed in esp_http_client or TLS behavior in 5.4.1 that could cause this?

This is the http config I'm using:

Code: Select all

HTTP_generic_event_t xEvent = {0};
    esp_http_client_config_t xConfig = {0};
    xConfig.url = fileDataInfo->url;
    xConfig.is_async = false;
    xConfig.event_handler = HttpApp_xEventHandler;
    xConfig.user_data = &xEvent;
    xConfig.cert_pem = Http_pcCertificate();
    xConfig.transport_type = HTTP_TRANSPORT_OVER_SSL;
    xConfig.timeout_ms = HTTP_CONN_TIMEOUT;
    xConfig.buffer_size = 1024;
    xConfig.buffer_size_tx = 1024;

    esp_http_client_handle_t xClient = esp_http_client_init(&xConfig);
    err = esp_http_client_perform(xClient);
Thanks in advance!

Dimitri_USDI
Posts: 1
Joined: Tue May 27, 2025 6:00 pm

Re: [ESP-IDF 5.4.1] HTTPS download errors + esp_tls_conn_read error

Postby Dimitri_USDI » Tue May 27, 2025 6:17 pm

We confirm the same behavior on 5.4.1 esp_http_client.
For our use case, we have a cell modem connected via PPPoS and registered as a netif interface.

Code: Select all

E (381996) transport_base: esp_tls_conn_read error, errno=No more processes
W (381996) HTTP_CLIENT: esp_transport_read returned:0 and errno:11
Proper handling of EAGAIN and adjusting socket timeout does not seem to resolve the issue.

matheusQuadros
Posts: 2
Joined: Fri May 16, 2025 12:01 pm

Re: [ESP-IDF 5.4.1] HTTPS download errors + esp_tls_conn_read error

Postby matheusQuadros » Thu May 29, 2025 10:23 am

After a lot of investigation, I found that the issue was caused by setting Wi-Fi power save to maximum:

Code: Select all

esp_wifi_set_ps(WIFI_PS_MAX_MODEM)
Changing it to the configuration below seems to have solved the problem:

Code: Select all

esp_wifi_set_ps(WIFI_PS_NONE)
Now, in our case, the download works correctly using both Wi-Fi and a cellular modem.

Who is online

Users browsing this forum: Bytespider, ChatGPT-User, Qwantbot and 4 guests