[web_server_idf] Increase HTTP server task stack to 4512 bytes (#21038)

This commit is contained in:
Jeroen
2026-10-20 19:59:52 -10:00
committed by GitHub
parent fb2ed65d1b
commit 659eab1958
@@ -148,10 +148,9 @@ 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.
// Allow room for SerializationBuffer's 640-byte stack buffer and HTTP request handling.
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.stack_size = config.stack_size + 256;
config.stack_size = 4512;
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.