0

I have a C# (.net 4.5) service in production which is compiled in debug. In one day it has leaked 900mb of memory. Actually uses 10gb of memory.

So I tried to make a diff with perfview, but I can't find my 900mb leaking.

What I can see is the unreachable memory has been increased about 1000mb. What does this mean?

So basically, I think there isn't a real memory leak. Maybe the GC is not working, as I expect.

perfview diff

perfmon

What can I do to find what it causing to incrase the memory consumption by 400mb-900mb per day?

magicandre1981
  • 27,895
  • 5
  • 86
  • 127
chris
  • 41
  • 5
  • I can see a lot of things on the large object heap - I'd start by finding out what they are and if there's a way of avoiding them. Then find out what's living to the 2nd gen they may well stay around for a very long time. Do you have some large xml? – doctorlove Aug 04 '16 at 15:31
  • It processed 23400 xml files with an avg of 5kb per file. There are 200 xml files between 50kb and 600kb. – chris Aug 04 '16 at 16:02

1 Answers1

2

Find memory leak with perfview

PerfView is a performance-analysis tool that helps isolate CPU- and memory-related performance issues.

What can I do to find what it causing to incrase the memory consumption by 400mb-900mb per day?

  1. Install a good memory profiler tool Eg: ANTS Memory Profiler, which comes with 14 day trial.

  2. Run the application by starting a profile session and check what instances are growing continuously.

This walkthrough covers everything you need to do. There is no big learning curve.

CharithJ
  • 46,289
  • 20
  • 116
  • 131