-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Platform
ESP32
IDE / Tooling
Arduino (IDE/CLI)
What happened?
Feature Request: There is no way to limit concurrent HTTP connections.
On memory-constrained projects, rapid page navigation causes stack overflow
because too many connections are handled simultaneously.
I would like to request adding setMaxClients() method to AsyncWebServer class,
similar to how AsyncWebSocket has cleanupClients().
Stack Trace
Example crash when rapidly clicking through pages with CONFIG_ASYNC_TCP_STACK_SIZE=3200:
Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered (async_tcp)
Note: This is not a bug report - including stack trace only because field is required.
The crash is preventable by increasing stack size, but limiting max clients
would provide better memory control.
Minimal Reproductible Example (MRE)
...
I confirm that:
- I have read the documentation.
- I have searched for similar discussions.
- I have searched for similar issues.
- I have looked at the examples.
- I have upgraded to the lasted version of ESPAsyncWebServer (and AsyncTCP for ESP32).