Analyze web application after crash
Problem
Application crashes or restart due to malfunction, but nothing is logged to explain the error
Solution
To make it possible to analyze the error, a process dump of the crashing process is required.
Install the “post mortem debugger” to create dump files automatically when this happens. The dump file is a snapshot of the IIS / web-viewer process and tells programmers in detail the program state at the point of the crash.
When IIS detects a failing application, it will stop the IIS process and generate the crash - and a dump file. Dump files are of the size of the process, make sure that the dump folder resides on a disk with more then 30 GByte of memory to hold space for several dump files.
If the application is unresponsive, or consumes near 100 % CPU for a long period, stop the w3wp.exe process (the IIS host process) to generate a crash. This should also generate a crash dump file for analyze.
To install the process dump function in Windows:
Download the application from: https://docs.microsoft.com/en-us/sysinternals/downloads/procdump
Extract all files to a folder in the Signifikant folder area (i.e. D:\Signifikant\Install)
Create a target folder for dump files, i.e D:\Signifikant\DebugDumpFolder
Configure the application to generate dumps: procdump -ma -i D:\Signifikant\DebugDumpFolder
When the program is not used any more, uninstall it: procdump -u
Also to supervise the system one may define a trigger to catch crashes in the IIS process, this would generate three dump files, check the application page for documentation. Trigger when the process has had 90% CPU for 10 seconds and generate 3 dump files before exiting. The command is active until ready so it must be run in a CMD shell for the duration of the dump collection.
procdump -c 90 -s 10 -n 3 w3wp.exe