PortalSiteMapProvider calling excessive SPRequest objects

We have a custom navigation website that uses the PortalSiteMapProvider from MOSS to create menu navigation. It looks like the provider is not managing the objects. Any idea on how to manage the objects created in the Provider?

This results in log errors:

Potentially excessive number of SPRequest (9) objects that are not currently released on stream 1. Make sure that this object or its parent (such as SPWeb or SPSite) is properly allocated. Distribution ID for this object: {56D66DBA-AE72-42DF-A70F-B45E05A60A08} Current distribution stack trace:
at Microsoft.SharePoint.SPRequestManager.Add (SPRequest, Boolean sharing)
at Microsoft.SharePoint.SPGlobalquotAndAndSPRe 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.InitWebPublic ()
at Microsoft.SharePoint.SPWeb.get_Exists ()
at Microsoft.SharePoint.Publishing.CachedObjectFactory.CreateWebFromUrl (String URL)
at Microsoft.Share .Publishing.Navigation.SPNavigationSiteMapNode..ctor (PortalWebSiteMapNode webNode, SPNavigationNode node, PortalSiteMapNode parentNode, type NodeTypes, string url, title String, description string)
to Microsoft.SharePoint.Publishing.Navigation.SPNavigation PortalSiteMapNode parentNode)
at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.ProcessSPNavigationNode (SPNavigationNode node, SPNavigationNode previousSibling, PortalSiteMapNode parentNode
)
at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMap.Navigation.PortalWebSiteMop.N (Including NodeTypesType, NodeTypes included HiddenTypes, OrderingMethod ordering, AutomaticSortingMethod method, Boolean ascending, Int32 lcid)
at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigation.Children (NodeTypes)
PortalNode.GetNavigation.Children (NodeTypes) includedHiddenTypes. , NodeTypes includedHiddenTypes)
in Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.GetChildNodes (SiteMapNode node)
in System.Web.SiteMapNode.get_ChildNodes ()
in Microsoft.SharePoint.Publishing.Navigation.PortalHierarchicalEnumerable.System.Collections.IEnumerable.GetEnumerator ()
in System.Web .UI.WebControls.Menu.DataBindRecursive (MenuItem node, IHierarchicalEnumerable enumerable)
at System.Web.UI.WebControls.Menu.DataBindRecursive (MenuItem node, IHierarchicalEnumerable enumerated)
at System.Web.UIMentemutems.Enum.
at System.Web.UI.WebControls.Menu.PerformDataBinding ()
at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect ()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind ()
at System.Web.UI.WebControls.Menu.DataBind ()
at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound ()
at System.Web.UI.WebControls.Menu.EnsureDataBound ()
at System.Web.UI.WebControls .BaseDataBoundControl.OnPreRender (EventArgs e)
at System.Web.UI.WebControls.Menu.OnPreRender (EventArgs e, Boolean registerScript)
at System.Web.UI.WebControls.Menu.OnPreRender (EventArgs e)
at Microsoft.SharePoint.WebControls AspMenu.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.Page.ProcessRequestMain (BooleAsan includeStages, Boolean includeStagesAfterAsyncPoint)
in System.Web.UI.Page.ProcessRequest (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
in System.Web.UI.Page.ProcessRequest () in System.Web.UI.Page.ProcessRequestWithNoAssert (HttpContext context)
in System.Web .UI.Page.ProcessRequest (HttpContext context) at ASP.VIEWPAGE_ASPX_2077083467.ProcessRequest (HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IEExecutioncuts
at System.Web.HttpApplication.ExecuteStep (step IExecutionStep, Boolean and completed synchronously)
at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps (exception error)
at System.Web.HttpApplication.System.Web.ProHttpAspAsync

+1


source to share


1 answer


Stefan Goßner seems to be the answer to the blog question. The problem is not that SPWeb objects are not being closed, but after a certain threshold (default 8) of distributions has been reached, an alert is generated in the log. Depending on the structure of your site, the number that will be generated will differ. Given the nested nature of navigation, objects remain open while traversing the subtree. This way the objects are properly disposed of, namely that more than 8 (by default) remain open at a given time.



See this question

+4


source







All Articles