Commit 1c8b855
authored
fix: ensure client keepalive < server keepalive to avoid client keepalive 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>1 parent cf8fbed commit 1c8b855
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
| 676 | + | |
| 677 | + | |
675 | 678 | | |
676 | 679 | | |
677 | 680 | | |
| |||
0 commit comments