none
Custom solution runs really slow and get time out errors

    Question

  • I have a custom project management solution deployed on SharePoint 2007 site collection. When I create some project it takes to long to save that project and create  sub site for  that project. Most of the time I get time out error. The code is designed by third party company, I can not see what is wrong  in code. 

    The error detail from log file is given below. Any help will be appreciated. Thanks

    Potentially excessive number of SPRequest objects (9) currently unreleased on thread 26.  Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed.  Allocation Id for this object: {FCAF5207-5F9C-480C-AFF9-5563347E328E} Stack trace of current allocation:    at Microsoft.SharePoint.SPRequestManager.Add(SPRequest request, Boolean shareable)     at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)     at Microsoft.SharePoint.SPWeb.InitializeSPRequest()     at Microsoft.SharePoint.SPWeb.EnsureSPRequest()     at Microsoft.SharePoint.SPWeb.get_Request()     at Microsoft.SharePoint.SPWeb.GetProperties()     at Microsoft.SharePoint.Utilities.SPPropertyBag..ctor(GetProperties getProperties, UpdateProperties updateProperties)     at Microsoft.SharePoint.SPWeb.get_Properties()     at Precio.IPU.GMS.UI.WebControls.NavigationElement.GetWebProperty(String webUrl, String key)     at Precio.IPU.GMS.UI.WebControls.NavigationElement.Page_Load(Object sender, EventArgs e)     at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)     at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)     at System.Web.UI.Control.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at ASP.GRANTPAGE_ASPX__666096652.ProcessRequest(HttpContext context)     at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)     at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)     at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)     at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)    

    Monday, February 27, 2012 10:10 AM

Answers

All replies

  • Hi eblogin,

    On the use of third-party solution, I suggest that you directly consult the third-party company or third-party forum to seek answers. Here's an article about the issue:
    http://blogs.technet.com/b/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx

    Thanks,
    Lhan

    Tuesday, February 28, 2012 8:11 AM
    Moderator
  • Hi , Thanks for the info

    I have got this time out error again today but this time the unreleased  SPRequest object are 1488 as shown below.  I have checked the code, all spsite and spweb objects are disposed properly. What I didn't  check is that we have a custom master page as well. do you think the problem is related to master page? 

    Thanks in advance.

    Potentially excessive number of SPRequest objects (1488) currently unreleased on thread 22.  Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed.  Allocation Id for this object: {77152BB3-4737-4EFC-B3E0-F7EB9E47F623} Stack trace of current allocation:    at Microsoft.SharePoint.SPRequestManager.Add(SPRequest request, Boolean shareable)     at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)     at Microsoft.SharePoint.SPWeb.InitializeSPRequest()     at Microsoft.SharePoint.SPWeb.EnsureSPRequest()     at Microsoft.SharePoint.SPWeb.get_Request()     at Microsoft.SharePoint.SPWeb.SetMondoProcHint(Int32 hint)     at Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId, Int32 mondoHint)     at Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId)     at Microsoft.SharePoint.Publishing.CachedArea.GetIdentityWeb(Guid webId, SPSite elevatedSite, Boolean isSuperUser)     at Microsoft.SharePoint.Publishing.CachedArea.GetSuperReaderIdentityWeb(SPSite site)     at Microsoft.SharePoint.Publishing.CachedArea.GetChildPageIds()     at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.PopulateNavigationChildren(NodeTypes includedTypes)     at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedTypes, NodeTypes includedHiddenTypes, OrderingMethod ordering, AutomaticSortingMethod method, Boolean ascending, Int32 lcid)     at MicrosoftSharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedHiddenTypes)     at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.GetChildNodes(PortalSiteMapNode node, NodeTypes includedHiddenTypes)     at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.GetChildNodes(SiteMapNode node)     at System.Web.SiteMapNode.GetAllNodesRecursive(SiteMapNodeCollection collection)     at System.Web.SiteMapNode.GetAllNodesRecursive(SiteMapNodeCollection collection)     at System.Web.SiteMapNode.GetAllNodesRecursive(SiteMapNodeCollection collection)     at System.Web.SiteMapNode.GetAllNodesRecursive(SiteMapNodeCollection collection)     at System.Web.SiteMapNode.GetAllNodes()     at Precio.IPU.GMS.UI.Design.UI.WebControls.TopMenuBar.IsActive(SiteMapNode bindingnode)     at ASP._controltemplates_gms_topmenubar_ascx.__DataBind__control8(Object sender, EventArgs e)     at System.Web.UI.Control.OnDataBinding(EventArgs e)     at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)     at System.Web.UI.Control.DataBindChildren()     at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)     at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)     at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)     at System.Web.UI.Control.DataBindChildren()     at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)     at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)     at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)     at System.Web.UI.WebControls.Repeater.EnsureDataBound()     at System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e)     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at ASP.STAKEHOLDERPAGE_ASPX__403903828.ProcessRequest(HttpContext context)     at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)     at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)     at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)     at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)    

    Tuesday, February 28, 2012 12:41 PM
  • Hi eblogin,

    Through internal resources,i found the a solution about it:

    CAUSE:

    ====================

    Unknown, possible customization attempt or the 3rd party software involvement during upgrade from previous version.

    RESOLUTION/WORKAROUND:
    ====================

    Migrate the site using stsadm import/export.

    If it still does not work,you need directly consult the third-party company or third-party forum to seek answers.

    Thanks,
    Lhan Han

    Wednesday, February 29, 2012 2:58 AM
    Moderator
  • Hi,

    From the error it shows that the objects created have not been  disposed properly.

    Hence it involves changes in code with explicitly calling dispose methods and to use using statements in the code.



    Thanks, Rahul Rashu

    Wednesday, February 29, 2012 6:31 AM
  • Hi Rahul

    Thanks for the answer.  but I have checked all code and teh spweb and spsite objects are disposed properly (by using statement).

    Problem is that we have about 1350 subsites in single site collection. All subsites link appears on top navigation  as dropdown menu in masterpage. 

    Wednesday, February 29, 2012 9:30 AM
  • Wednesday, February 29, 2012 10:49 AM
  • Hi eblogin

    You can remove the .Dispose(); instead to use using (SPWeb docLibWeb = spweb){}. When you use the using (),you needn't to use .Dispose();
    Have a look at this post:
    http://social.msdn.microsoft.com/Forums/eu/sharepointdevelopment/thread/5f8b78f3-25ff-4589-a641-18be05d1321a

    Thanks,
    Lhan Han

    Thursday, March 01, 2012 2:58 AM
    Moderator