Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces dynamic resolution of backend request timeouts from environment variables (such as ROUTER_PROXY_TIMEOUT_SECONDS, ROUTER_PREFILL_TIMEOUT_SECONDS, ROUTER_DECODE_TIMEOUT_SECONDS, and ROUTER_MULTIPART_TIMEOUT_SECONDS) with fallbacks to default values, alongside corresponding unit tests. Feedback suggests validating that the parsed timeout values are non-negative and finite to prevent unexpected runtime behavior or exceptions, and adding tests to cover these edge cases.
Address review feedback on vllm-project#1082: negative or non-finite values (e.g. -10, nan, inf) now fall back to the default instead of being passed to aiohttp.ClientTimeout. Add unit tests for these cases.
…ariables Backend request timeouts (proxy, prefill, decode, multipart) were hard-coded. Allow overriding them via ROUTER_PROXY_TIMEOUT_SECONDS, ROUTER_PREFILL_TIMEOUT_SECONDS, ROUTER_DECODE_TIMEOUT_SECONDS and ROUTER_MULTIPART_TIMEOUT_SECONDS, following the LOADAWARE_BETA env fallback pattern so values can be adjusted on a running deployment. Empty or non-numeric values fall back to the previous defaults. Add unit tests for the timeout resolution helper. Signed-off-by: Vit Habada <[email protected]>
Address review feedback on vllm-project#1082: negative or non-finite values (e.g. -10, nan, inf) now fall back to the default instead of being passed to aiohttp.ClientTimeout. Add unit tests for these cases. Signed-off-by: Vit Habada <[email protected]>
97c39c2 to
8a7add0
Compare
|
Thanks for working on this. We ran into the same unbounded proxy timeout in production and solved it in our fork. Some findings that might help here, whatever shape this PR takes:
The implementation and operator notes are in our fork's README, section "Backend socket timeouts": https://github.com/Mazyod/production-stack#backend-socket-timeouts. We're happy to help reconcile it with this PR or to contribute it separately, whichever you prefer. |
…ibutions The user removed the two-PR limit and asked to give upstream every verified finding, letting upstream decide what is useful. Record the new rule, the PRs and issues posted on 2026-11-24 (vllm-project#1231-vllm-project#1238, plus comments on vllm-project#1082 and vllm-project#1141), what was deliberately not proposed, and how upstream was verified given its stale lockfile. Link the pending upstream work from the README patch index. Docs-only; it does not trigger a release. Signed-off-by: ci-sim <ci@sim> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EkWp1KKx8oCX8JA3mXdkVJ Signed-off-by: ci-sim <ci@sim>
Description
Backend request timeouts in the router's request service were hard-coded:
This PR makes them configurable via environment variables, following the existing
LOADAWARE_BETAenv fallback pattern so values can be adjusted on a running deployment without changing the router's command line:ROUTER_PROXY_TIMEOUT_SECONDS(default: unset / no timeout)ROUTER_PREFILL_TIMEOUT_SECONDS(default: 300)ROUTER_DECODE_TIMEOUT_SECONDS(default: 600)ROUTER_MULTIPART_TIMEOUT_SECONDS(default: 300)Empty or non-numeric values are ignored with a warning and fall back to the defaults.
Testing
src/tests/test_request_timeouts.pycovering default fallback, env override, float values, and empty/non-numeric env values.[Bugfix]/[Router]