[release/6.0] [HTTP] Scavenge fix #62008
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #61530 to release/6.0
/cc @ManickaP
Fixes #61505
Fixes #61506
Customer Impact
The issue was reported by a customer. In case the pool scavenging job would take longer than the interval in which the timer is triggered we would just start another one in parallel. The client app is a crawler visiting millions of different URLs and that's why they have so many different pools in the manager and why the scavenging job might take a while to finish.
Having multiple scavenging jobs run in parallel is unwanted (#61505). So with this change we restart the job only after the current run has finished. We also kick off connection disposal asynchronously to not to block the scavenging on actual
SslStream
/NetworkStream
closing (#61506).Testing
I've provided private binaries to the customer which confirmed (via manually collected dump after 50 mins run) that the fix helped.
Risk
Low to Medium.
It's unfeasible to have test coverage for crawler-like (millions of different URIs) scenarios that triggered the issues so we don't have our own test coverage, only validation from the customer.