mirror of
https://github.com/sredevopsorg/deepseek-kubernetes-sandbox.git
synced 2026-11-03 09:23:25 +00:00
Every proxied response is streamed through _relay using one shared httpx.AsyncClient configured with timeout=HTTP_TIMEOUT (300s). An idle SSE or long-poll stream therefore raised httpx.ReadTimeout every five minutes, which escaped the StreamingResponse as a full traceback and truncated the browser's stream. Build proxied requests with a timeout that leaves read unbounded (connect, write and pool stay bounded), and end the relay quietly on httpx.HTTPError instead of propagating it. The relay is cancelled when the browser disconnects and _relay closes the upstream response, so an unbounded read cannot outlive the client. Docs: note the split in the HTTP_TIMEOUT row. Co-authored-by: SREDevOpsAgents <agents@sredevops.org>
45 KiB
45 KiB