Skip to content

High memory consumption after exceptions being thrown #474

Closed

Description

@tovyhnal

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

Activity

  1. tovyhnal commented on Oct 17, 2024

    @tovyhnal
    Author

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

    Image

  2. added
    bug
    on Oct 24, 2024
  3. MattB-msft commented on Oct 24, 2024

    @MattB-msft
    Member

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

  4. ChrisIsidora commented on Oct 30, 2024

    @ChrisIsidora

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

  5. MattB-msft commented on Nov 6, 2024

    @MattB-msft
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions