diff --git a/local-instance/proxy/nginx.conf b/local-instance/proxy/nginx.conf index 22ce5eb..0066b5f 100644 --- a/local-instance/proxy/nginx.conf +++ b/local-instance/proxy/nginx.conf @@ -25,6 +25,17 @@ server { proxy_read_timeout 300s; proxy_send_timeout 300s; + # The legacy client sets several large cookies at once (jwt plus the + # Etherpad session it requests on every topic page), which overflows + # nginx's default 4k header buffer: the upstream answers 200 and the proxy + # still returns 502 with "upstream sent too big header". Topic pages are + # the visible casualty, and because the MCP server's topic-page scrape + # degrades to an empty list by design, the ids it recovers just silently + # vanish rather than erroring. + proxy_buffer_size 32k; + proxy_buffers 8 32k; + proxy_busy_buffers_size 64k; + # version-aggregator-svc upstream; /serverversion and /nuxtversion are the # real per-app endpoints and are routed below. location = /version { diff --git a/local-instance/scripts/gen-proxy-conf.py b/local-instance/scripts/gen-proxy-conf.py index 1544a2a..ff8a246 100644 --- a/local-instance/scripts/gen-proxy-conf.py +++ b/local-instance/scripts/gen-proxy-conf.py @@ -76,6 +76,17 @@ server { proxy_read_timeout 300s; proxy_send_timeout 300s; + # The legacy client sets several large cookies at once (jwt plus the + # Etherpad session it requests on every topic page), which overflows + # nginx's default 4k header buffer: the upstream answers 200 and the proxy + # still returns 502 with "upstream sent too big header". Topic pages are + # the visible casualty, and because the MCP server's topic-page scrape + # degrades to an empty list by design, the ids it recovers just silently + # vanish rather than erroring. + proxy_buffer_size 32k; + proxy_buffers 8 32k; + proxy_busy_buffers_size 64k; + # version-aggregator-svc upstream; /serverversion and /nuxtversion are the # real per-app endpoints and are routed below. location = /version {