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.

My IIS7 webservers are getting hundreds of requests a second, and at a known time a stackoverflow caused IIS7 to recycle the app pool. How can I see which request contained the stackoverflow, and ideally what the stack trace was in that request when IIS decided to kill the app pool?

share|improve this question
    
I can't remember if it's by default or I changed something, but I get exceptions (and I think a stack trace too) in the event log –  Ben Pilbrow Sep 18 '11 at 18:32

1 Answer 1

How do you know it's a stack overflow? Whatever's reporting this would seem to be reporting that the process crashed.

Get set up for next time - run DebugDiag 1.2 or a crash-mode debugger against the process and get set up for a memory dump on crash.

So in short:

  1. Work out the PID of the app pool for the current instance (you might want to turn off recycling so that it doesn't keep changing; or use DebugDiag, which can target an App Pool across PIDs)
  2. ADPLUS / PROCDUMP -P PID -CRASH (or run DebugDiag with a Crash rule for that App Pool)
  3. Get the dump file, and feed it into DebugDiag
  4. Look for particularly long thread stacks
share|improve this answer
    
the event log says it is a stackoverflow, but otherwise gives no helpful info. –  dan Sep 19 '11 at 0:09
    
Posting the event would help everyone trying to help. More diagnostic information is always better than less. –  TristanK Sep 19 '11 at 3:17

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.