I am trying to eliminate reboots in an ASP.NET application. The application restarts about 20 times a day. I register using the log4net library. Following the advice of this question , I have an application that logs the reason for stopping with HostingEnviornment.ShowdownReason inside the Application_End() event in Global.asax. I also log when an application starts in the Application_Start() event.
After starting the logs for several days, I found that when the shutdown is actually logged, the reason for the reboot is always HostingEnvironment . But shutdown is not always recorded. I know, because I see Application_Start() log events that do not have the corresponding Application_End() event.
What can cause the hosting environment to restart my application? Is there a way to get more specific information about why he decided to start a restart? Does the fact that the shutdown event is not always logged sheds light on what might cause a reboot?
UPDATE
I'm still struggling with this. The links from around the web seem to indicate that using WinDbg / SOS.dll / ADPlus.vbs is necessary to eliminate the cause of this problem. But between learning how to use these tools and figuring out how to interpret the results correctly, it seems that he has a very steep learning curve. I still hope that there is something that can help me track down the reason for the restarts without resorting to disassembling the CLR code. Does anyone have other tools or tricks that can help me?
source share