[SOLVED] Memory problems in ASP.NET


I got problems with memory in my asp.net application. The problem is that I can’t see any problems when running it locally (between 100-200mb) but on the production system I get 503-errors because of the memory limit (512mb) being reached (running it on shared hosting).

How can I pin down the problem? I don’t think that I have access to the current memory usage, at least I have not found any way and the company who hosts my site says that there is no way.

I have absolutely no experience tracking down memory leaks. 🙂



Use a trial version of RedGate’s Memory Profiler


or JetBrains dotTrace


Both tools are very simple and easy to use and do a great job of identifying protential memory leaks etc.

Most common sources of leaks are missed dispose calls, or poor management of event handlers… depending on the size of your code base, you may be able to just “spot” the trouble spots, but I find using a tool speeds up the process greatly as both will present before/after snapshots of the object graphs so you can see what is and is not being cleaned up by th GC.

Good overview of memory management:

Answered By – Chris Baxter

Answer Checked By – Clifford M. (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *