App Pool memory issue

Arya, Lalit (Omaha) 0 Reputation points
2025-11-05T17:18:32.51+00:00

Our web API's app pool is consuming an excessive amount of memory, and while we've attempted to debug the memory dump using Visual Studio, we aren't receiving the assistance we need. We are seeking additional support to resolve this issue.

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 81,971 Reputation points Volunteer Moderator
    2025-11-05T17:48:12.08+00:00

    generally this is caused by not calling Dispose() when required. be sure to use a "using" statement with disposable objects. you might also have excessive caching. it can be slow and tedious to track down. see:

    https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-debug-managed-memory-dump?view=vs-2022

    0 comments No comments

  2. Varsha Dundigalla(INFOSYS LIMITED) 3,725 Reputation points Microsoft External Staff
    2025-11-06T11:34:28.09+00:00

    Thank for reaching out.
    The App Pool for your web API is consuming excessive memory, and Visual Studio dump analysis hasn’t provided enough insight. This can happen due to memory leaks, inefficient caching, or even legitimate high usage under heavy load. To diagnose the root cause, deeper analysis tools are recommended.

    1. Capture Memory Dumps
      Use Debug Diagnostic Tool (DebugDiag) to collect memory dumps when memory usage spikes. Analyze the report for leaks or abnormal allocations.
    2. Profile Memory Usage
      Run PerfView or Windows Performance Monitor to monitor allocation trends and identify which objects or processes consume the most memory.
    3. Enable IIS Failed Request Tracing
      Correlate memory spikes with specific requests or operations to pinpoint problematic endpoints.
    4. Check Garbage Collection Behavior
      Use CLR Profiler or PerfView to verify if GC is working efficiently and detect pinned objects or large object heap growth.
    5. Review App Pool Recycling Settings
      Configure recycling based on private memory limits to prevent uncontrolled growth during investigation.

    Reference:

    Please let us know if you require any further assistance, we’re happy to help.

    If you found this information useful, kindly mark this as "Accept Answer".


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.