Hello

I faced an interesting case some time ago  that I would like to share with all of  you. One of our customers were expenriencing time outs when creating a web applciation. I collected a memory dump and we foung the following call stack:

System.Threading.WaitHandle.WaitOne(Int64, Boolean)

System.Diagnostics.Process.WaitForExit(Int32)

Microsoft.SharePoint.Administration.SPAdministrationServiceUtilities.RunCommand(System.String,System.String, System.TimeSpan)

Microsoft.SharePoint.Administration.SPProvisioningAssistant.RegisterAspNetClientFiles()

Microsoft.SharePoint.Administration.SPWebApplication.Provision()

Microsoft.SharePoint.ApplicationPages.ExtendVirtualServerPage.BtnSubmit_Click(System.Object,System.EventArgs)

System.Web.UI.WebControls.Button.OnClick(System.EventArgs)

System.Web.UI.WebControls.Button.RaisePostBackEvent(System.String)

System.Web.UI.Page.RaisePostBackEvent(System.Web.UI.IPostBackEventHandler,System.String)

System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)

System.Web.UI.Page.ProcessRequest(Boolean, Boolean)

System.Web.UI.Page.ProcessRequest()

System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)

ASP._admin_extendvs_aspx.ProcessRequest(System.Web.HttpContext)

System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)

System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)

System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback)

System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)

System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr,IntPtr, IntPtr, Int32)

System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)

 

With not doubts, when the issue happened the provision of the SPWEbApplication was waiting for an external event and because of the method Microsoft.SharePoint.Administration.SPProvisioningAssistant.RegisterAspNetClientFiles() that appears on the top of the stack, it seemed that the culprit was IIS.

When we inspected the IIS manager. I found a big amount of application pools. As you probably know, SharePoint 2010 only supports10 application pools per WFE http://technet.microsoft.com/en-us/library/cc262787.aspx#WebserverAppServer (FYI MOSS 2007 only supports 8 application pools per WFE)

However, we applied a simple work around until the customer will reduce the number of application pools. Directly we tuned the shut down time and the ping time to 300 seconds whne a enw IIS application pool will be created.

I hope this will help you.

Kind Regards.

Héctor Calvarro Martín. SharePoint Dev/Core. Microsoft Support Escalation Engineer for EMEA