[web_server] Increase httpd task stack size to prevent stack overflow (#14997)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2026-03-20 13:57:51 -10:00
committed by Jesse Hills
parent 0bf6e1e839
commit 98b4e1ea15
@@ -120,7 +120,10 @@ void AsyncWebServer::begin() {
if (this->server_) {
this->end();
}
// Default httpd stack is defined by ESP-IDF. Increase to accommodate SerializationBuffer's
// 640-byte stack buffer used by web_server JSON request handlers.
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.stack_size = config.stack_size + 256;
config.server_port = this->port_;
config.uri_match_fn = [](const char * /*unused*/, const char * /*unused*/, size_t /*unused*/) { return true; };
// Always enable LRU purging to handle socket exhaustion gracefully.