-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Net.Http.CreditWaiter excessive memory consumption #50495
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionWhile profiling an application during a sudden and constant increase in memory usage i've discovered that a single instance of CreditWaiter was retaining 4GB of memory. It appears that most of the consumption comes from the stacktrace strings retained by the CreditWaiter:
Configuration
Other information
|
Thanks for the report. Could you share a repro? |
@stephentoub I'm wondering about CreditWaiter.ResetForAwait... should this be unregistering the cancellation token registration? Dispose calls UnregisterAndOwnCompletion, but ResetForAwait doesn't. |
Isn't |
Could be because |
I suspect you are right @stephentoub. There's also something like 700MB in byte[], which is probably most buffers. That's a lot of buffers. |
Hi @stephentoub, sorry for the delay. I've tried to come up with a repro, but so far i've not been successfully. I'll let you know as soon as i have it. Let me give you a bit of context about this app: I think the problem comes from the fact that, from time to time, there are sudden burts of change notifications being produced, to such an extent that results in hundreds of thousands of concurrent requests per minute. I suspect that some subscribers aren't able to keep up with this level of concurrent requests, so a lot of connections are being made. Maybe i should limit the number of connnections through MaxConnectionsPerServer property, but i'm afraid that would result in a lot of contention. Maybe #44818 would be useful in this scenario. |
Triage: Looks like we do not have much to make it actionable. |
Description
While profiling an application during a sudden and constant increase in memory usage i've discovered that a single instance of CreditWaiter was retaining 4GB of memory.
It appears that most of the consumption comes from the stacktrace strings retained by the CreditWaiter:
Configuration
Other information
The text was updated successfully, but these errors were encountered: