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

High memory consumption after exceptions being thrown #474

Closed
tovyhnal opened this issue Oct 16, 2024 · 4 comments
Closed

High memory consumption after exceptions being thrown #474

tovyhnal opened this issue Oct 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@tovyhnal
Copy link

As suggested in here, we started using ServiceClient as singleton in our application. Recently we noticed, that our web application started occasionally failing with OutOfMemoryException.

We believe, this is connected with our migration to singleton ServiceClient.

I was able to repro this (high memory usage) locally, by requesting non-existing entity from DV, which resulted in exception being thrown in ServiceClient. After 10k of such iterations, memory grew to 1,4GB.

Image

I suspect, it is connected to DataverseTraceLogger and this code which add any thrown exception into internal list of exceptions. This can accumulate over days to size, which causes service to crash with OutOfMemoryException.

See below state of DataverseTraceLogger after ~400 exceptions thrown.
Image

@tovyhnal
Copy link
Author

I ran memory profiler, which I believe confirms my assumption:

Image

@MattB-msft MattB-msft added the bug Something isn't working label Oct 24, 2024
@MattB-msft
Copy link
Member

Fix was provided by reporter internally
thanks @tovyhnal ,
Fix will be provided in the next update drop to the client.

@ChrisIsidora
Copy link

@MattB-msft Is there an estimate when this will be included in a new release?

@MattB-msft
Copy link
Member

Fix was provided in the associated release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants