How to take memory dump when IIS Applicationpool recycles

application-poolsasp.netiis-7.5memory usagewindows-server-2008-r2

Applicationpools in our production environment randomly recycle because it reached its private bytes memory limit (Event id 5117). The private memory limit is set to 1.6 gigabytes.

From time to time we get a Event id 5013 "A process serving application pool exceeded time limits during shut down". after the applicationpool recycles.

Is there any way we can take a memory dump right before the applicationpool recycles to figure out what is going on?

Best Answer

Seems the best way to achieve taking a dump og the process as close to recycling as possible is using ProcDump

Command procdump -m -ma -s 10 c:\temp\PrivateBytesLimitReached.dmp