Handling high memory levels in ASP.NET

High memory is when you see that your Aspnet_wp.exe process (Internet Information Services (IIS) 5.0) or W3wp process (IIS 6.0) memory is consistently increasing and is not returning to a comfortable level (under 600 MB in the default 2 GB user memory address space).

Quick things to check when you experience high memory levels in ASP.NET -

  • Application set up for debugging? Disable debugging & tracing in web.config on moving app to Production server
  • String concatenation - use System.Text.StringBuilder class
  • Not yet running the .NET Framework 1.1 Service Pack 1 (SP1) ? Install it.
  • Recycle periodically - For some applications, it's a pretty good idea to just restart the worker process every couple of days or so, at a convenient time.

Comments