Skip to content
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

Dispose httpclient ObjectCache for ApplicationLoadContext unloading #46

Open
nickeeex opened this issue Oct 31, 2022 · 0 comments
Open

Comments

@nickeeex
Copy link
Contributor

In .net framework AppDomains MemoryCaches are automatically registered to listen to AppDomain.OnUnload event and dispose there.
In dotnet this event is not fired so the MemoryCache is not disposed of automatically leading to a memory leak on the frends agent when the old Processes are not being evicted from memory.

For 5.5.4 this issue has been remedied partially directly in the product but this fix should still be implemented in the task itself.
Recommended ways to fix this is to create a static constructor for Frends.Web and listen to AppLoadContext(ALC) unload even and handle cleanup of resources there.

Consider that ALC's do not exist in .net framework and the task is multitarget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant