From 8438f8504245834026d598a294469652ef203de2 Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:38:30 -0700 Subject: [PATCH] Lower the HTTPX connection limit to 5 --- synapseclient/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapseclient/client.py b/synapseclient/client.py index 61bcf73c5..cbc94c2f1 100644 --- a/synapseclient/client.py +++ b/synapseclient/client.py @@ -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 = ( @@ -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, ) }