Skip to content

Don’t reuse httpx clients when talking to the backend

Andrej Shadura requested to merge no-connection-pooling-on-server into main

Maximum connection limits run out quickly when talking to the backend, possibly because they don’t expire for some not completely understood reasons. Since the backend doesn’t talk HTTP/2 or TLS, connection pooling doesn’t get utilised as much (or at all), so it doesn’t make much sense to have one client rather than create a client per request or a related group of requests thus keeping their lifetimes limited and avoiding the issue altogether.

Merge request reports