GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — `bm_fastapi` intermittently fails with `httpx.PoolTimeout` under load · Issue #508 · python/pyperformance Open DescriptionSummaryThe Environment
How to reproduceThe benchmark fires import asyncio, httpx CONCURRENCY = 150 async def bench(url): async with httpx.AsyncClient() as client: # default max_connections=100 tasks = [client.get(f"{url}/items/{i}") for i in range(CONCURRENCY)] await asyncio.gather(*tasks) With a server that takes ~6 seconds per response:
Actual resultThe benchmark dies: Root cause
Expected behaviorThe benchmark should complete regardless of how loaded the machine is, because Suggested fixSize the connection pool to the benchmark's concurrency: async with httpx.AsyncClient( limits=httpx.Limits(max_connections=CONCURRENCY), ) as client: This removes the queuing entirely, so no request can exceed the pool timeout. ScopeOnly ActivityMetadataMetadataAssigneesLabelsNo labels ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |