(Not sure if this is an IIS problem or not, so if this is better suited for SO I'll happily move it...)
We have an IIS-hosted application that is sporadically dying, and the event logs claim that the application pool is reporting itself as unhealthy due to deadlocks. I'm attempting to get a crash dump of the process as it's dying, to see if we can pinpoint the problem.
I have following this Microsoft KB Article #828222, which says there is an option on the application pool to enable "Orphaned Worker Process" analysis. We've followed those steps exactly -- installed the debugger tools, enabled the Orphaned Worker Process option for the application pool, and set up a batch file to run when it happens:
adsutil.vbs SET W3SVC/AppPools/MyAppPool/OrphanWorkerProcess TRUE
adsutil.vbs SET W3SVC/AppPools/MyAppPool/OrphanActionExe "c:\debug\dump.cmd"
adsutil.vbs SET W3SVC/AppPools/MyAppPool/OrphanActionParams "%1%"
The debugdump.cmd
essentially just runs cdb
on the PID of the dying process (after computing a unique file name):
c:\debug\cdb.exe -c ".dump /o /ma %FILENAME%;q" -p %1
The IIS side of the configuration seems to be correct -- it does try to run the batch file on the dying process. But it doesn't actually do anything, because according to cdb
:
Cannot debug pid 3236, NTSTATUS 0xC000010A
"An attempt was made to access an exiting process."
The whole point of this option, I assumed, was that IIS would not kill the process before the debugger had a chance to dump it; did I miss something in the configuration?
0 Answers