Skip to content

HTTP/HTTPS POST timeout setting ignored, multiple sequential POSTS in short time period cause failure in 3.3.0-alpha1 #11389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
bfeldman-threadb opened this issue May 21, 2025 · 0 comments
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@bfeldman-threadb
Copy link

bfeldman-threadb commented May 21, 2025

Board

ESP32 S2 SOLO 2 module

Device Description

ESP32 S2 SOLO 2 module in a custom environment connected to a variety of other hardware, including I2C (DS3231 RTC, ADS7828) and SPI (Adafruit ILI9341 TFT, PN532 RFID board, NAU7802 ADC).

Hardware Configuration

ESP32 S2 SOLO 2 module in a custom environment connected to a variety of other hardware, including I2C (DS3231 RTC, ADS7828) and SPI (Adafruit ILI9341 TFT, PN532 RFID board, NAU7802 ADC).

Version

latest development Release Candidate (RC-X)

IDE Name

Arduino IDE 2.3.6

Operating System

Windows 11

Flash frequency

240Mhz

PSRAM enabled

no

Upload speed

921600

Description

I have code that runs fine on 3.2.0. This issue is occurring when I update the ESP32 board definition to 3.3.0-alpha1, and the problem disappears when board definition is reverted to 3.2.0.

In the posting routine the timeouts for https and http are set to 5000 (from the default 120000).

In 3.2.0 the line:
int postResult = https.POST(encodedString, ilength);
continues if no response is received after 5000 ms

In 3.3.0 the line:
int postResult = https.POST(encodedString, ilength);
will hang for the full 120000 ms (120 seconds) if no response is received even though a 5000 ms timeout is specified earlier in the routine

Other symptoms - this was detected when multiple posts were initiated sequentially. This problem is not experienced if one POST is made every 2 minutes, but it was noticed when more than one post was made within 2 seconds of another POST successfully completing. With 3.2.0 multiple (at least 10) POSTS could be made 2 seconds apart and all would be successful. With 3.3.0-alpha1 more than one POST (2 seconds apart) could cause a POST failure and a timeout and would generally cause a failure by the second or third POST command.

Sketch

HTTPClient1 https;
    HTTPClient1 http;
    https.setReuse(false);
    http.setReuse(false);
    https.setTimeout(5000);
    http.setTimeout(5000);

esp_task_wdt_reconfigure(&twdt_config2);

if (https.begin(server, rootCert))
        {
            protectedPrint("connected: ");
            protectedPrintln(https.connected());
            https.addHeader("Content-Type", "application/x-www-form-urlencoded");

            protectedPrint("POST: ");
            int postResult = https.POST(encodedString, ilength);
            protectedPrintln(postResult);
            protectedPrint("Response: ");
            https.getString().toCharArray(scc, 490);
            protectedPrintln(scc);
            https.end();
}

Debug Message

No specific debug message is provided as this is not causing a failure, although

https.POST(encodedString, ilength);

returns -1 when no response is received
returns 200 when a successful response is received

That behavior is as expected. In board definition 3.2.0 a failure would return -1 in 5000 ms. In board definition 3.3.0-alpha1 -1 would not be returned for a failure for 120000 ms.

Other Steps to Reproduce

This issue never occurred on board definition 3.2.0 and only started occurring when the ESP32 board definition was updated to 3.3.0-alpha1, and the problem disappeared when board definition was reverted to 3.2.0.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@bfeldman-threadb bfeldman-threadb added the Status: Awaiting triage Issue is waiting for triage label May 21, 2025
@bfeldman-threadb bfeldman-threadb changed the title HTTP/HTTPS POST timeout setting ignored HTTP/HTTPS POST timeout setting ignored, multiple sequential POSTS in short time period cause failure in 3.3.0-alpha1 May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

No branches or pull requests

1 participant