diff --git a/backend/app/platform/client.py b/backend/app/platform/client.py index d2ccfa2..5ffbab5 100644 --- a/backend/app/platform/client.py +++ b/backend/app/platform/client.py @@ -36,6 +36,7 @@ from app.platform.sign import build_sign, wfs_sig _EXECUTION = re.compile(r'name="execution"\s+value="([^"]+)"', re.I) _PUBLIC_KEY = re.compile(r'setPublicKey\("([^"]+)"\)') +POOL_CONNECTIONS = 300 class NqiError(Exception): @@ -130,7 +131,10 @@ class NqiClient: timeout=httpx.Timeout(45.0, connect=15.0), follow_redirects=True, trust_env=False, - limits=httpx.Limits(max_connections=200, max_keepalive_connections=40), + limits=httpx.Limits( + max_connections=POOL_CONNECTIONS, + max_keepalive_connections=POOL_CONNECTIONS, + ), ) async def aclose(self) -> None: