-
Notifications
You must be signed in to change notification settings - Fork 770
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
ConfigurationRoot holding too many ConfigurationReloadToken - Possible memory leak #2576
Comments
@davidfowl Does this match your investigation from #861? |
@nkpun Can you reproduce this? Are you reloading configuration at runtime? Can you email the details david.fowler at microsoft.com (we can also figure out how to get me the memory dump). |
Thanks @davidfowl , I've sent email with all the details. Let know if you don't receive within few minutes. |
Thanks heaps for your help @davidfowl on helping us identify the root cause of memory leak. For others benefit, see screenshot below on cause of steady memory growth. Serilog was configured as Transient as opposed to Singleton. Hence it was raising too many Reload Token calls. |
As part of the migration of components from dotnet/extensions to dotnet/runtime (aspnet/Announcements#411) we will be bulk closing some of the older issues. If you are still interested in having this issue addressed, just comment and the issue will be automatically reactivated (even if you aren't the author). When you do that, I'll page the team to come take a look. If you've moved on or workaround the issue and no longer need this change, just ignore this and the issue will be closed in 7 days. If you know that the issue affects a package that has moved to a different repo, please consider re-opening the issue in that repo. If you're unsure, that's OK, someone from the team can help! |
We have built Microservice using NETCORE 2.2. On load test we noticed a significant memory growth. The Dump shows below:
Memory dump Analysis:
Seems “System.Threading.CancellationTokenSource+CallbackNode” was being repeated called for large amount of times. While each of them need to hold a System.Threading.IAsyncLocal[] object.
All these calls can be traced back to Microsoft.Extensions.Configuration.ConfigurationReloadToken.
I found the similar bug been reported here:
#861
However, this bug seems to only been fixed in NETCORE 3.0.0.
Given that we are facing this issue on NETCORE 2.2, can you please advice:
We also tried setting the disabling reload but didn't help.
The text was updated successfully, but these errors were encountered: