开发者

Diagnosing IIS Shutdowns

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:

  • http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx
  • http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx

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 w开发者_如何学JAVAith 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?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜