Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can we create a log whenever the application pool of IIS crashes and restarts ? Do we have to manage the error log by asp.net or IIS does it for itself... The issue is that that admin gets to see when the IIS had restarted ? Further which version of IIS is best suited for this kind of job.

share|improve this question

migrated from stackoverflow.com Jan 1 '10 at 21:04

This question came from our site for professional and enthusiast programmers.

    
As told by george an entry is created in windows event viewer. Is there any list avaliable that gives details of various event log no eg 1009 etc. Also how can we pick this event log and display on the web-page ? –  HotTester Dec 31 '09 at 18:04

4 Answers 4

The application pool shouldn't crash generally speaking - So you may want to attach the debugging tools for windows and get a crash dump if it does - then have your more senior developers dig into what is causing it - The crash dump will provide the details.

share|improve this answer

When the app pool crashes it should create an entry in the windows event viewer typically 1009. I would recommend IIS 6 (just because i personally know it better than IIS 7) But I am sure IIS7 will be a better piece of software.

share|improve this answer

Use the Debug Diagnostic tool to generate and to analyze crash memory dumps.

http://support.microsoft.com/kb/919789

share|improve this answer

You can use ProcDump to do this. It's a handy command line utility that you point to a running instance and specify the circumstances under which you want it to generate a dump file. One such option is to do so when the process terminates (specifically, -t ).

Download ProcDump: http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx

usage: procdump [-64] [[-c CPU usage] [-u] [-s seconds]] [-n exceeds] [-e [1]] [-h] [-m commit usage] [-ma] [-o] [-p counter threshold] [-r] [-t] < [dump file]] | [-x [arguments]>

-64 By default Procdump will capture a 32-bit dump of a 32-bit process when running on 64-bit Windows. This option overrides to create a 64-bit dump. -c CPU threshold at which to create a dump of the process. -e Write a dump when the process encounters an unhandled exception. -h Write dump if process has a hung window (does not respond to window messages for at least 5 seconds). -m Memory commit threshold in MB at which to create a dump of the process. -ma Write a dump file with all process memory. The default dump format includes thread and handle information. -n Number of dumps to write before exiting. -o Overwrite an existing dump file. -p Trigger on the specified performance counter when the threshold is exceeded. -r Reflect (clone) the process for the dump to minimize the time the process is suspended (Windows 7 and higher only). -s Consecutive seconds CPU threshold must be hit before dump is written (default is 10). -t Write a dump when the process terminates. -u Treat CPU usage relative to a single core. -x Launch the specified image with optional arguments. Use the -accepteula command line option to automatically accept the Sysinternals license agreement.

To just create a dump of a running process, omit the CPU threshold. If you omit the dump file name, it defaults to .dmp.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.