Monday, April 26, 2010

Fighting with Memory leaks on Asp.Net server

Hi,

Memory leaks are a real pain, but how to fight with them?
Best way to find is to set you AppDomain to recycle or a new worker process restart after a definite memory size ideally  around 700 mb for  Servers withe 4 GB RAM.

Once done look at your task manager, if you find new worker process tarting every 1 -2 minutes when the complaining user try to operate on the weeping page that the culprit.

Than compare the last minute changes done with the previous version's and you will find the issue..

The advance way to find the memory leeks issue is in the following manner..
Use perfmon to records the counter which details about the CLR memory..
My other post on Perfmon  is attached..

Once done also record the IIS based and ASP.net based counter..
If you take a look on CLR memory usage counter after half an hour of putting load on server their will be sharp spike and thats the point where their is maximum chance of memory exceeding the current physical or virtual settings..

Use HP load runner or automated load testing tool to simulate the scenario, you will get to find the culprit one by comparing the time of Load runner results when the problem occurred and the counter details from the Perfmon settings..

No comments:

Recent Posts