Skip to content

[serve] Increase default uvicorn keep alive timeout #54127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

akyang-anyscale
Copy link
Contributor

Why are these changes needed?

The current default timeout (5 seconds) is shorter than the default idle timeout on common reverse proxies. This can lead to the connection being terminated on the serve side while the revproxy is writing the request to the connection. This PR increases the default timeout to 90 seconds to mitigate this issue.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
@akyang-anyscale akyang-anyscale requested a review from a team as a code owner June 26, 2025 04:59
@akyang-anyscale akyang-anyscale added the go add ONLY when ready to merge, run all tests label Jun 26, 2025
@zcin zcin merged commit 41269f8 into ray-project:master Jun 27, 2025
5 checks passed
lk-chen pushed a commit to alexeykudinkin/ray that referenced this pull request Jun 29, 2025
## Why are these changes needed?

The current default timeout (5 seconds) is shorter than the default idle
timeout on common reverse proxies. This can lead to the connection being
terminated on the serve side while the revproxy is writing the request
to the connection. This PR increases the default timeout to 90 seconds
to mitigate this issue.

Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
elliot-barn pushed a commit that referenced this pull request Jul 2, 2025
## Why are these changes needed?

The current default timeout (5 seconds) is shorter than the default idle
timeout on common reverse proxies. This can lead to the connection being
terminated on the serve side while the revproxy is writing the request
to the connection. This PR increases the default timeout to 90 seconds
to mitigate this issue.

Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
goutamvenkat-anyscale pushed a commit to goutamvenkat-anyscale/ray that referenced this pull request Jul 4, 2025
## Why are these changes needed?

The current default timeout (5 seconds) is shorter than the default idle
timeout on common reverse proxies. This can lead to the connection being
terminated on the serve side while the revproxy is writing the request
to the connection. This PR increases the default timeout to 90 seconds
to mitigate this issue.

Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
Signed-off-by: Goutam V <goutam@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants