How to solve memory leak in IIS w3p.exe

I found some couple of solutions in Google and compiled them here if anyone has problems with memory leak in IIS w3wp.exe :)

Reasons for Memory Leak:

Could be a million things: database connections not being closed, ADO objects not being properly destroyed...unless there's only a few sites on the server you're going to have a lot of trouble tracking down which one is the culprit.

 

Method 1:

Attach a debugger onto that w3wp.exe when it is at 100%, determine what code is currently executing and chewing up CPU cycles, and fix that code to not chew up CPU.

DebugDiag or IISState can help with this.

Debug Diagnostics 1.0 in IIS Diagnostics Toolkit (x86)

-----------------------------------------------------------

http://www.microsoft.com/downloads/details.aspx?FamilyID=9bfa49bc-376b-4a54-95aa-73c9156706e7&DisplayLang=en

http://www.microsoft.com/downloads/details.aspx?FamilyID=9bfa49bc-376b-4a54-95aa-73c9156706e7&DisplayLang=en

 

IISState url

--------------------

http://www.iisfaq.com/default.aspx?view=P197

http://www.iisfaq.com/default.aspx?view=P197

How to read memory dump files by IISState

------------------------------------------

http://www.codeproject.com/debug/moomoo.asp

http://www.codeproject.com/debug/moomoo.asp

http://blogs.msdn.com/joncole/archive/2007/03/29/creating-a-process-memory-dump.aspx

http://blogs.msdn.com/joncole/archive/2007/03/29/creating-a-process-memory-dump.aspx

 

download the debug symbols & debugging tools.

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

 

 

Method 2 (more faster way):

-----------

Use

http://iismonitor.motobit.com/

http://iismonitor.motobit.com/

Or

http://www.troxo.com/products/iisguard/ to monitor IIS request

http://www.troxo.com/products/adomonitor/ to monitor bad database connections

With the first two you can monitor what is running, and if this problem is happening quickly, ie causing you problems quickly then you will at least be able to get a snapshot of what was run in that period and at least have narrowed it down to a few sites/files which should make it a little easier to track down?

http://www.troxo.com/products/iisguard/ to monitor IIS request

http://www.troxo.com/products/adomonitor/ to monitor bad database connections

With the first two you can monitor what is running, and if this problem is happening quickly, ie causing you problems quickly then you will at least be able to get a snapshot of what was run in that period and at least have narrowed it down to a few sites/files which should make it a little easier to track down?

http://www.troxo.com/products/adomonitor/ to monitor bad database connections

With the first two you can monitor what is running, and if this problem is happening quickly, ie causing you problems quickly then you will at least be able to get a snapshot of what was run in that period and at least have narrowed it down to a few sites/files which should make it a little easier to track down?

Published Monday, October 29, 2007 5:13 AM by darenhan

Comments

# classic asp memory leaks in IIS | Daniel Friedmann

Saturday, April 11, 2009 3:44 AM by classic asp memory leaks in IIS | Daniel Friedmann

Pingback from  classic asp memory leaks in IIS | Daniel Friedmann

# Determining and solving memory leaks in IIS « Alen Ziver Malhasoglu's Microsoft Commerce Server Blog

Pingback from  Determining and solving memory leaks in IIS « Alen Ziver Malhasoglu's Microsoft Commerce Server Blog

Powered by Community Server (Commercial Edition), by Telligent Systems