You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HttpConnectionPool attempts to create connections for pre-canceled requests #66990
Starting with 6.0, cancelling a request does not remove it from the request queue immediately.
Instead, available connections consume the queue. If they encounter an already canceled request, they simply skip it.
If a connection attempt fails, it will attempt to fail the first request in the queue if the queue hasn't moved since the connection attempt started. If the queue is not empty, it will try to inject a new connection.
This makes it so that each request gets at least one connection attempt.
If there are a lot of cancelled requests in the queue and connection attempts keep failing, the queue will be drained very slowly (we will waste a connection attempt for each entry).
It's possible this will be slower than the rate of incoming requests, resulting in the queue constantly growing with more and more cancelled requests, resulting in an effective memory leak.
This issue is worse for HTTP/2 by default since we only allow a single pending connection attempt at a time, where as we will open Min(requests, MaxConnectionsPerServer) connections for HTTP/1.1 (#66944).
Activity
MihaZupan commentedon Mar 24, 2022
Reopening for 6.0 servicing
MihaZupan commentedon Apr 13, 2022
Servicing PR has been merged, closing.
karelz commentedon Apr 21, 2022
Fixed in 7.0 (main) in PR #66992 and in 6.0.5 in PR #67226.