fix: 把连接池上限提高到三百并与保活连接数对齐
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user