title: How do I get visibility / debug high memory usage in a dotnet Core application running on IIS
body: <p>We have an application we have recent ported to use the <a href="http://aspnetboilerplate.com/" rel="noreferrer">Aspnet boilerplate</a> framework and are having a number of issues regarding memory usage. Our initial symptom was intense memory usage with no alleviation in times of high use. Memory use increased over night and over the weekends, but not at the rate it did during peak times. As I type this, I'm monitoring and seeing the app use upwards of 5Gb of memory on the system when a normal usage would be at most 500 - 550mb. We profiled the app using a couple of memory profiling tools and found a couple of potential leaks in framework libraries and in the version of Kestrel we were referencing, but even after repairing the issues, the footprint continued to be heavy. The behavior we see now is the app's memory usage will grow indefinitely but forcing garbage collection in the memory profiling tools will recover large swathes of it. Monitoring the app over the weekend showed that the app was operating normally under light use, but today (Monday) during peak times the app is bleeding memory again. I'm not sure what direction to go in, or how to get visibility on what the actual issue is. The memory profiling tools don't show any obvious leaks or issues in that regard, and the fact that the memory can be reclaimed by forcing garbage collection seems suspicious to me.</p>