SharePoint 2010 y time outs al crear un web application

Hola

Tuvimos un caso interesante hace tiempo que puede ser interesante para vosotros. Uno de nuestros clientes sufría time outs al crear un web application. Recogimos un volcado de memoria y al analizarlo nos topamos con la siguiente cima de pila de llamadas

 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)

Sin lugar a duda el thread encargado de la provisión del SPWebApplication estaba esperando por un evento externo y debido al método Microsoft.SharePoint.Administration.SPProvisioningAssistant.RegisterAspNetClientFiles() presente en la parte superior de la pila, todo apuntaba al IIS

Al inspeccionar la administración del Servidor IIS (inetmgr) nos encontramos que tenían un número grandísimo de Web Applications. Como sabréis ,o deberías saber, en SharePoint 2010 sólo se soportan 10 application pools por servidor https://technet.microsoft.com/en-us/library/cc262787.aspx#WebserverAppServer (FYI en MOSS 2007 son 8 application pools por servidor)

No obstante, aplicamos un "work around" bastante sencillo hasta que el cliente redujera el número de application pools. Directamente cambiamos a nivel de servidor el shut down time y el ping time a 300 segundos de los application pools en IIS.

Espero que os haya servido de utilidad.

Un saludo

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