Skip to content

Commit

Permalink
Lower the HTTPX connection limit to 5
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Oct 7, 2024
1 parent fb05d4d commit 8438f85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapseclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def __init__(

httpx_timeout = httpx.Timeout(70, pool=None)
self._requests_session_storage = requests_session_storage or httpx.Client(
timeout=httpx_timeout
limits=httpx.Limits(max_connections=5), timeout=httpx_timeout
)

cache_root_dir = (
Expand Down Expand Up @@ -427,7 +427,7 @@ async def close_connection() -> None:
self._requests_session_async_synapse.update(
{
asyncio_event_loop: httpx.AsyncClient(
limits=httpx.Limits(max_connections=25),
limits=httpx.Limits(max_connections=5),
timeout=httpx_timeout,
)
}
Expand Down

0 comments on commit 8438f85

Please sign in to comment.