We have an Asp.NET application holding all of our server logic.
This application only accommodates the services (no pages).
From some reason after some time the w3wp.exe process memory consumption tends to bloat.
It grows in a matter of seconds to the maximum size availble (in my server up to 10 gigabytes).
It happens unexpectedly, so we can’t really recreate by demand.
I need some help with debugging this issue.
Does anyone know of a good tool i can use? maybe something i can tell to dump the memory or take a snapshot when the process reaches some memory consumption.
Any help will be appreciated.
Daniel
Red Gate makes some very nice .NET profiling tools. I believe the memory profiler (which should help you find leaks) has an eval version that may be useful.
Some simple things to check:
Are you allocating any IDisposable objects (HttpWebRequest, WCF objects, anything that uses unmanaged resources or unsafe code) and not disposing them?
Do you have any queries that might be trying to load an entire very large table into RAM? (Unlikely) Check memory usage around any LINQ code that’s manipulating SQL results.