Beware Tracing in ASP.NET can lead to Memory leaks eventually OOM

Today while helping my colleague AnilKP to debug a memory leak issue for w3wp.exe. It was the perfect example to demonstrate scenario where memory leaks were self induced. Here is the complete saga End customer complained that they had noticed worker process(w3wp.exe) hogs lots of memory. They have notices 1.2 GB process size in the…

0

Look who is reserving large amount of virtual memory on 64 bit: It is . Net GC heaps

On 64 bit window 2003/2008 servers as soon as you give any .Net (.aspx) resource requests you would notice w3wp.exe taking large amount of memory in form of Virtual bytes. Looking in task manager we would notice W3wp.exe Process/Commit size: 380 MB Whereas looking into perfmon virtual bytes counter or  in IIS 7 => Worker…

2

Why you should not use System.Drawing from ASP.NET applications

  Probably you would heard it many times and it is quite evident from the MSDN article  http://msdn.microsoft.com/en-us/library/system.drawing.aspx “Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance…

1