views:

898

answers:

4

I am working on an ASP.NET web application, it seems to be working properly when I try to debug it in Visual Studio. However when I emulate heavy load, IIS crashes without any trace -- log entry in the system journal is very generic, "The World Wide Web Publishing service terminated unexpectedly. It has done this 4 time(s)." How is it possible to get more information from IIS to troubleshoot this problem?

A: 

The key is "without any trace". You need to put your own trace logging in to create some chatter. Then you'll be able to spot where the chatter stops.

Joel Coehoorn
+3  A: 

Crash dump of asp.net process should give you tons of info..If you want to quickly get some info on why the process got recycled, try this tip from Scott Gu.. Health monitoring feature of asp.net 2.0 is also worth looking at..

Gulzar
Man, debugging IIS is pain. I hate it.
caustic
+1  A: 

ASP.NET Tracing... http://www.beansoftware.com/ASP.NET-Tutorials/Tracing-ASP.NET.aspx

Bloodhound
+3  A: 

Download Debugging tools for Windows: http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx

Debugging Tools for Windows has has a script (ADPLUS) that allows you to create dumps when a process CRASHES: http://support.microsoft.com/kb/286350

The command should be something like (if you are using IIS6):

cscript adplus.vbs -crash -pn w3wp.exe

This command will attach the debugger to the worker process. When the crash occurs it will generate a dump (a *.DMP file).

You can open it in WinDBG (also included in the Debugging Tools for Windows). File > Open Crash dump...

By default, WinDBG will show you (next to the command line) the thread were the process crashed.

The first thing you need to do in WinDBG is to load the .NET Framework extensions:

.loadby sos mscorwks

then, you will display the managed callstack:

!clrstack

if the thread was not running managed code, then you'll need to check the native stack:

kpn 200

This should give you some ideas. To continue troubleshooting I recommend you read the following article:

http://msdn.microsoft.com/en-us/library/ms954594.aspx

Sacha