[MLI-8206] Set an explicit, configurable timeout on the sync forwarder - #864
Closed
lorenzo-norcini-scale wants to merge 2 commits into
Closed
[MLI-8206] Set an explicit, configurable timeout on the sync forwarder#864lorenzo-norcini-scale wants to merge 2 commits into
lorenzo-norcini-scale wants to merge 2 commits into
Conversation
The sync http-forwarder posts to the local inference server without an explicit aiohttp timeout, so the client default of total=300s applies. Non-streaming generations that take longer than 5 minutes are cut off with a 500 while the inference server keeps computing the response. Add a timeout_seconds field to Forwarder and LoadForwarder (default 3600s), overridable per deployment via forwarder.sync.timeout_seconds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reject zero, negative, non-finite, and non-numeric values when the forwarder config is loaded, instead of letting them reach aiohttp.ClientTimeout at request time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
billyang-scale
approved these changes
Aug 13, 2026
Collaborator
Author
|
Superseded by the consolidated incident-hardening PR: see the PR referencing this one. |
Collaborator
Author
|
Superseded by #868. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The sync http-forwarder posts to the local inference server without an explicit aiohttp timeout, so aiohttp's client default of
total=300sapplies. Non-streaming generations that take longer than 5 minutes are cut off with a 500 (TimeoutErrorinforwarding.py:forward) while the inference server keeps computing the response. Observed on theqwen3-5-9bmodel-zoo endpoint (MLI-8206).Change
timeout_secondsfield toForwarderandLoadForwarder, passed asaiohttp.ClientTimeout(total=...)on the forward request.forwarder.sync.timeout_seconds).__call__path (requests-based) and the streaming forwarder are unchanged.Testing
LoadForwarder.load.tests/unit/inference: 53 passed, 2 skipped locally.🤖 Generated with Claude Code
Greptile Summary
The PR adds a configurable one-hour default timeout to asynchronous non-streaming forward requests and validates overrides during forwarder loading.
aiohttp.ClientTimeout.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "Validate timeout_seconds at forwarder lo..." | Re-trigger Greptile