Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Watchdog in AsyncTCP when sending very long chunked response #164

@Levak

Description

@Levak

Hi there!

Description

When the ESPAsyncWebServer sends a very long chunked response (over 30 seconds), the ESP32 crashes on a watchdog timeout in AsyncTCP. I can see in Chrome DevTools that the chunked answer is being sent correctly, one chunk at a time, but when the 30 seconds mark hits, the ESP32 resets.

In my code, I am trying to traverse a list of files from an SD card. After roughly 300 files (700 in this particular test) sent, aka 30 seconds, the problem appears.
Pagination can be implemented, but we are trying to stay retro-compatible with an official WebUI that lacks such feature. This is sadly a regression compared to a basic WebServer app, where the timeout can be as long as one wants, as long as the client doesn't disconnect.

Link: https://github.com/Levak/sdwifi/blob/async/sdwifi.ino#L714

Board: esp32-pico-d4 (Fysetc SD WIFI PRO)

Stack trace

E (809882) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (809882) task_wdt: - async_tcp (CPU 0/1)
E (809882) task_wdt: Tasks currently running:
E (809882) task_wdt: CPU 0: IDLE0
E (809882) task_wdt: CPU 1: loopTask

Additional notes

Old discussion about this code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions