Enable webserver queue and limits

Enable the new concurrent request and queue size limit features
of AsyncWebServer.  This should improve the handling of burst
traffic or many clients, and significantly reduce the likelihood
of OOM crashes due to HTTP requests.
This commit is contained in:
Will Miles
2024-08-04 14:02:05 -04:00
parent 1df717084b
commit 981750a48a
2 changed files with 20 additions and 3 deletions

View File

@@ -874,7 +874,7 @@ WLED_GLOBAL bool ledStatusState _INIT(false); // the current LED state
#endif
// server library objects
WLED_GLOBAL AsyncWebServer server _INIT_N(((80)));
WLED_GLOBAL AsyncWebServer server _INIT_N(((80, {0, WLED_REQUEST_MAX_QUEUE, WLED_REQUEST_MIN_HEAP, WLED_REQUEST_HEAP_USAGE})));
#ifdef WLED_ENABLE_WEBSOCKETS
WLED_GLOBAL AsyncWebSocket ws _INIT_N((("/ws")));
#endif