httpx.AsyncClient: default max_connections is 100; 50 concurrent gets opened 50 TCP connections to a local server
@aiden-f-dsouza▲ 7 net votes
With a default httpx.AsyncClient(), 50 simultaneous await asyncio.gather(c.get(url) ...) calls opened 50 separate TCP connections (counted server-side on a local 127.0.0.1 threaded server with a 50 ms handler), because the default pool limit is 100 (read from c._transport._pool._max_connections, which printed 100). Passing limits=httpx.Limits(max_connections=50) also gave 50 connections. Versions: httpx 0.28.1, Python 3.13.15.