Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I get more detail about ASP.NET app restarts than HostingEnvironment.ShutdownReason?
    primarykey
    data
    text
    <p>I'm troubleshooting restarts in an ASP.NET application. The application is restarting about 20 times a day. I'm logging using the log4net library. Following advice from <a href="https://stackoverflow.com/questions/829392/how-to-discover-the-reason-of-asp-net-application-restart">this question</a>, I have the application logging the reason for the shutdown from <code>HostingEnviornment.ShowdownReason</code> inside the <code>Application_End()</code> event in Global.asax. I also log when the application starts up in the <code>Application_Start()</code> event.</p> <p>After running the logs for several days, I've found that when a shutdown is actually logged, the reason for the restart is always <code>HostingEnvironment</code>. But the shutdown is not always logged. I know that because I can see <code>Application_Start()</code> log events that don't have a corresponding <code>Application_End()</code> event.</p> <p>What would cause the hosting environment to restart my application? Is there a way to get more specific information about why it decided to trigger the restart? Does the fact that the shutdown event is not always logged shed any light on what may be causing the restarts?</p> <p><strong>UPDATE</strong></p> <p>I'm still struggling with this. <a href="http://www.codinghorror.com/blog/2004/06/debugging-aspnet_wp-in-production.html" rel="nofollow noreferrer">Links</a> <a href="http://blogs.msdn.com/b/tess/archive/2008/05/14/asp-net-performance-issue-large-number-of-application-restarts-due-to-virus-scanning.aspx" rel="nofollow noreferrer">from</a> <a href="http://msdn.microsoft.com/en-us/library/Ee817662(pandp.10).aspx" rel="nofollow noreferrer">around</a> <a href="https://stackoverflow.com/questions/829392/how-to-discover-the-reason-of-asp-net-application-restart">the</a> <a href="http://blogs.msdn.com/b/rextang/archive/2007/07/24/4026494.aspx" rel="nofollow noreferrer">web</a> seem to indicate that using WinDbg/SOS.dll/ADPlus.vbs will be necessary to track down the cause of this issue. But between learning how to use these tools and figuring out how to correctly interpret the results, it seems to come with a very steep learning curve. I'm kind of still hoping there is something out there that can help me track down the cause of the restarts without resorting to disassembling CLR code. Does anyone have any other tools or tricks that can help me with this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload