Repository navigation
[Bugfix][Router] Orchestrated P/D: no ten-minute total limit on the decode request - #1127
ibrahimnd2000 wants to merge 3 commits into
Conversation
…ecode request The decode request used aiohttp.ClientTimeout(total=600), so every response still generating after ten minutes was cut mid-stream: the client gets a truncated body and the decode engine logs an abort. Long reasoning answers (60k+ tokens at ~100 tokens/s) hit it. Use no total limit; a streaming response fails after 600 s without data instead. Signed-off-by: Muhammad Ibrahim <ibrahimnd2000@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request removes the 10-minute total timeout limit for orchestrated decode requests to prevent long-running streaming responses from being cut off mid-stream. Instead, it introduces an idle timeout of 600 seconds that only triggers if no data is received during streaming, and adds a corresponding test suite. Feedback suggests adding explicit connection timeouts (connect and sock_connect) to the client timeout configuration to prevent requests from hanging indefinitely if the backend decode engine is unreachable.
…ls fast Signed-off-by: Muhammad Ibrahim <ibrahimnd2000@gmail.com>
|
@ApostaC @YuhanLiu11 @Shaoting-Feng @ruizhang0101 could one of you review when you have a moment? Three small fixes to the orchestrated P/D path, each with tests:
The |
Signed-off-by: Muhammad Ibrahim <ibrahimnd2000@gmail.com>
4e63f3c to
68c61f6
Compare
route_orchestrated_disaggregated_requestsends the decode request withaiohttp.ClientTimeout(total=600). Any response still generating after ten minutes is therefore cut mid-stream:Aborted request;Long reasoning answers hit it routinely. At ~100 tokens/s per stream, anything above ~60k tokens fails, which is well within
max_tokensfor reasoning models.Seen in production on a GLM-5.3 P/D deployment (vLLM 0.31) during an AIME eval sent with
max_tokens: 131072:Fix: no total limit on the decode request. A streaming response now fails only after
DECODE_STREAM_IDLE_TIMEOUT_S(600 s) with no data, so a stalled decode is still cut but a long stream that keeps producing tokens isn't. A non-streaming response only arrives after generation, so it gets no read limit either. The prefill request keeps its 300 s limit.Verified on our deployment: a streamed 120,000-token generation ran 834 s and completed (
finish_reason=length). Before the fix it would have been cut at 600 s.Tests:
src/tests/test_disaggregated_orchestrated_decode_timeout.pyruns the orchestrated flow with a fake client and checks the timeout each request is sent with:Both cases fail on
main(assert 600 is None). The rest ofsrc/testspasses (262;test_multipart_proxy.pycouldn't be collected locally becausehttpxisn't installed). pre-commit passes.Related orchestrated-P/D fixes: #1126 (prefill-request token limits), #1117, #1122, #1123.