Connections in the pool never get to the idle state when a proxy is being used #3452
Unanswered
rafikahmed
asked this question in
Potential Issue
Replies: 1 comment
-
Just to emphasize more here's the output when no proxy is being used:
Connections change state from active to idle as expected. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So we're using httpx in production. We have a service that receives a list of URLs and parses them. For each URL we make two concurrent requests proxy and non-proxy. The first one that is fulfilled first we return it.
Now, over time and while checking the traces on DD we noticed that the
proxy
requests takes some time to start (laddering effect).To understand what was going on, we started logging as a metric the connection pool info, and we noticed that for proxy requests idle connections are always 0 although we've explicitly configured the client to use
x
number ofmax_keepalive_connections
.In contrast
non-proxy
requests are working fine and the resources are well managed:Here's the code I'm running locally just to test:
Output:
The output shows that new connections are always acquired and the connection never gets to the idle state (Again this is only when a proxy is being used).
Beta Was this translation helpful? Give feedback.
All reactions