IIS application pool may be terminated while collecting dump
Consider the following scenario:
- You are running a web application on IIS and you need to collect a memory dump of the application pool process (w3wp.exe).
- W3wp.exe in subject consumes huge memory, for example, around 40 GB, and it takes some time to write the dump file.
- When you try to collect a memory dump of the worker process, it is terminated and the memory dump is corrupted.
This may be happening because of the “health monitoring” configuration of the application pool. For example the following screenshot shows the default settings for health monitoring:
The following happens with the default configuration seen in the screenshot above:
- WAS will monitor application pool by pinging it every 30 seconds (Ping Period configuration).
- If the process does not respond in 90 seconds (Ping Maximum Response Time) then WAS will terminate the process.
Remember that the process is suspended when a dump is written to the disk, which means that it will not respond to WAS’ ping request and if that exceeds the ping maximum response times then WAS will terminate the process.
If you see the similar behavior and you need to collect a useful dump then you may need to increase the ping timeout or set “ping enabled” to false until you collect the memory dump.
Please note that changing these settings will cause application pool recycle.
--
AMB