mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
The comment and test docstring said a short keep-alive makes nginx reuse a connection gunicorn is closing and return 502. Reproducing the race says otherwise: across 320 requests timed against the close boundary, GET and POST alike, nothing failed and nginx logged nothing. It notices the closed idle connection and opens a fresh one. What the short value does cost is the connection pool. Measured with a counting upstream behind nginx, eight requests three seconds apart opened eight upstream connections at a 2s idle close and one at 65s, so below nginx's idle timeout the keepalive it now enables by default never pays off. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HDXxq3vAxJVGhm1pQuK8V7