From c1b86d6f5d6841355951ebaa11c52c5b69e1030d Mon Sep 17 00:00:00 2001 From: Sendao Yan Date: Fri, 6 Nov 2026 10:27:28 +0800 Subject: [PATCH] Fix bm_fastapi benchmark failing with httpx.PoolTimeout under load --- pyperformance/data-files/benchmarks/bm_fastapi/run_benchmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyperformance/data-files/benchmarks/bm_fastapi/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_fastapi/run_benchmark.py index 3e440325..5857c07b 100644 --- a/pyperformance/data-files/benchmarks/bm_fastapi/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_fastapi/run_benchmark.py @@ -63,7 +63,7 @@ def setup_server(): def bench_fastapi(loops, url): async def run_benchmark(): - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(limits=httpx.Limits(max_connections=CONCURRENCY)) as client: t0 = pyperf.perf_counter() for i in range(loops):