我们的应用程序托管在 Windows Server 2012 和 IIS 7.5 上,但当应用程序池超过 4.5 GB 且用户很少时,应用程序就会崩溃。这是 Windows 事件查看器中的错误堆栈:
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
Stack:
at System.Collections.ArrayList..ctor(Int32)
at System.Web.RequestTimeoutManager.CancelTimedOutRequests(System.DateTime)
at System.Web.RequestTimeoutManager.TimerCompletionCallback(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
找出问题所在的最佳方法是什么?我们如何监控应用程序以及导致池崩溃的原因是什么?