Diagnosing IIS Shutdowns
Asked Answered
I

2

6

Symptoms:

  • I attach a debugger, I wait a little while, it automatically detaches
  • I watch the event log during normal operation - after a single request comes in, it waits a little bit, the shuts down

Disagnosing. I've followed the following steps for logging shutdowns in IIS:

I know these are working because...

What I see in the Event Logs when I change the web.config:

The description for Event ID 0 from source ASP.NET 2.0.50727.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 



_shutdownMessage=IIS configuration change
HostingEnvironment initiated shutdown
CONFIG change
CONFIG change
HostingEnvironment caused shutdown

_shutdownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
   at System.Web.Hosting.HostingEnvironment.InitiateShutdown()
   at System.Web.Hosting.PipelineRuntime.StopProcessing()

the message resource is present but the message is not found in the string/message table

But it doesn't help because the mysetery error doesn't tell me anything. I see the same thing as from before I added this extra logging:

The description for Event ID 0 from source ASP.NET 2.0.50727.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 



_shutdownMessage=HostingEnvironment initiated shutdown
HostingEnvironment caused shutdown

_shutdownStack=   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
   at System.Web.Hosting.HostingEnvironment.InitiateShutdown()
   at System.Web.Hosting.PipelineRuntime.StopProcessing()

the message resource is present but the message is not found in the string/message table

Anyone have any ideas for more debugging?

Indistinguishable answered 20/5, 2010 at 15:33 Comment(0)
I
0

Well, it turns out that IIS somehow got set to recycle the pool every minute - certainly not the usual configuration. (I think it was a prank.) I'm leaving this up so anyone who googles that error message might find something that helps them.

Indistinguishable answered 20/5, 2010 at 15:46 Comment(0)
K
0

Here's a good reference:

http://blogs.iis.net/mailant/archive/2008/03/07/iis7-diagnostics-for-developers-talk-at-mix08.aspx

You can also use DebugDiag:

http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&DisplayLang=en

DebugDiag is the tool MS Support would have you use to generate a report for them to inspect.

Kizzee answered 20/5, 2010 at 15:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.