From 6d85eb49f82e4fdb9f18cdc19327cabd42fe2b8d Mon Sep 17 00:00:00 2001 From: Ben Nicholson Date: Fri, 25 Sep 2026 07:35:02 +1000 Subject: [PATCH] lwIP: 16 sockets so web clients are not starved With the default 10, PTP (2), AES67 TX, SAP, syslog and httpd's listen/control sockets left ~3 for web clients although httpd allows 7. A browser's keep-alive connections then made new requests fail with a reset for seconds at a time (the intermittent 'outages'). Reproduced: with 1 idle connection held, new requests were reset. After: 6 idle connections held, new requests answered in 6-7 ms. Co-Authored-By: Claude Opus 5.5 --- sdkconfig.defaults | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 05407f4..a085ea9 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -19,3 +19,8 @@ CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y # LLDP and PTP send raw frames from their own tasks next to lwIP: serialise EMAC transmits CONFIG_ETH_TRANSMIT_MUTEX=y + +# lwIP default is 10 sockets; PTP (2), AES67 TX, SAP, syslog and httpd's listen/control sockets +# use 7, leaving ~3 for web clients (httpd allows 7): a browser's keep-alive connections then +# starve new requests. 16 = 7 others + 7 web clients + OTA self-test client + 1 spare. +CONFIG_LWIP_MAX_SOCKETS=16