At some point, shortly after a code push, we saw numerous restarts occurring in our web application with no logging indicating an issue whatsoever. So I found this article: http://weblogs.asp.net/scottgu/433194 and we added Application_End logging, which immediately revealed this:
_shutDownMessage=Recompilation limit of 15 reached 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.InitiateShutdownWithoutDemand() at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace) at System.Web.Compilation.DiskBuildResultCache.ShutdownCallBack(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()
Googling this error reveals surprisingly little, so we updated our web.config
<compilation debug="false" numRecompilesBeforeAppRestart="100">
and viola! Everything back to normal. We reviewed our changes thoroughly but didn't find anything that we felt could've been the culprit.
Has anyone else encountered this or similar, or has knowledge / suspicions of what in the world could've caused this? Any feedback would be superb!
See Question&Answers more detail:os