Repository navigation
fix: ensure client keepalive < server keepalive to avoid client keepalive desync errors - #1555
Merged
ananthsub merged 1 commit intoJun 23, 2026
Conversation
cmunley1
previously approved these changes
Jun 10, 2026
ananthsub
force-pushed
the
ananthsub/client-server-keepalive-timeouts
branch
from
June 10, 2026 08:37
b7a8b6e to
b04120b
Compare
ananthsub
force-pushed
the
ananthsub/client-server-keepalive-timeouts
branch
from
June 11, 2026 03:34
b04120b to
2235ecc
Compare
ananthsub
force-pushed
the
ananthsub/client-server-keepalive-timeouts
branch
from
June 16, 2026 17:08
2235ecc to
46c9356
Compare
ananthsub
enabled auto-merge (squash)
June 16, 2026 17:25
ananthsub
force-pushed
the
ananthsub/client-server-keepalive-timeouts
branch
2 times, most recently
from
June 23, 2026 16:40
2294f57 to
d6d4269
Compare
…nectedError uvicorn closes idle keep-alive connections after 5s by default while the aiohttp client keeps them pooled for 15s, causing ServerDisconnectedError when the client reuses a socket the server already closed. Set the client TCPConnector keepalive_timeout to 15s and the uvicorn timeout_keep_alive to 30s so pooled sockets are guaranteed live when reused. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
ananthsub
force-pushed
the
ananthsub/client-server-keepalive-timeouts
branch
from
June 23, 2026 21:43
d6d4269 to
26f3b66
Compare
ananthsub
disabled auto-merge
June 23, 2026 21:48
ritaneves
pushed a commit
that referenced
this pull request
Jun 25, 2026
…live desync errors (#1555) uvicorn closes idle keep-alive connections after 5s by default ([ref](https://uvicorn.dev/settings/#timeouts)) while the aiohttp client keeps them pooled for 15s by default ([ref](https://docs.aiohttp.org/en/stable/client_reference.html#connectors)), causing ServerDisconnectedError when the client reuses a socket the server already closed. This PR set the client TCPConnector `keepalive_timeout` to 15s and the uvicorn `timeout_keep_alive` to 30s so pooled sockets are guaranteed live when reused. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com> Signed-off-by: Rita Fernandes Neves <rfernandesne@nvidia.com>
haifengqian
added a commit
to haifengqian/NeMo-Gym-fork
that referenced
this pull request
Oct 10, 2026
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.
uvicorn closes idle keep-alive connections after 5s by default (ref)
while the aiohttp client keeps them pooled for 15s by default (ref), causing ServerDisconnectedError when the client reuses a socket the server already closed.
This PR set the client TCPConnector
keepalive_timeoutto 15s and the uvicorntimeout_keep_aliveto 30s so pooled sockets are guaranteed live when reused.