Exception of type 'System.OutOfMemoryException' was thrown
There's another thread that talks about this problem, but it seems to have run dead so I'd like to bring this up again.
This morning we were working on our Sitefinity site, on the master pages in particular. We were struggling to disable the CSS files rendered out by the Telerik controls, but we eventually figured it out.
Then we moved our theme files into the new folder structure under App_data as suggested by Telerik. We followed the instructions to configure the new theme under the administration section, created a new template and applied the new theme to the template.
Everything worked well, but then suddenly the application started crashing. We monitored the server memory and noticed a serious problem with the worker process memory consumption. From the rate at which it swallows up memory (up to 2Gb within 5-10 seconds) it would seem like some kind of infinite loop. What doesn't make sense though is why?
The Sitefinity and Windows event log list the following:
----------------------------------------Timestamp: 1/20/2012 11:13:36 AMMessage: HandlingInstanceID: a67013be-427c-41a3-ba8e-638010c08247An exception of type 'System.OutOfMemoryException' occurred and was caught.---------------------------------------------------------------------------01/20/2012 13:13:36Type : System.OutOfMemoryException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Message : Exception of type 'System.OutOfMemoryException' was thrown.Source : mscorlibHelp link : Data : System.Collections.ListDictionaryInternalTargetSite : Void set_Capacity(Int32)Stack Trace : at System.Collections.Generic.List`1.set_Capacity(Int32 value) at System.Collections.Generic.List`1.Add(T item) at Telerik.Sitefinity.Modules.Pages.PageHelper.GetTemplates(PageNode pageNode) at Telerik.Sitefinity.Web.PageSiteNode.LoadPageData() at Telerik.Sitefinity.Web.PageSiteNode.get_Visible() at Telerik.Sitefinity.Web.RouteHelper.CheckSiteMapNode(SiteMapNode pageSiteMapNode) at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.FilterNodes(SiteMapNodeCollection nodes, Boolean modifyCollection) at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.Helper.FilterChildNodes(SiteMapNode node, SitefinitySiteMapDataSource dataSource) at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.InnerPageSiteNode.get_ChildNodes() at Telerik.Sitefinity.Web.RouteHelper.CheckGroupSiteMapNode(PageSiteNode node) at Telerik.Sitefinity.Web.RouteHelper.CheckSiteMapNode(SiteMapNode pageSiteMapNode) at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.FilterNodes(SiteMapNodeCollection nodes, Boolean modifyCollection) at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.Helper.FilterChildNodes(SiteMapNode node, SitefinitySiteMapDataSource dataSource) at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.InnerPageSiteNode.get_ChildNodes() at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.GetNodes(SiteMapNode node) at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.GetPathNodeCollection(String viewPath) at Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.GetView(String viewName) at System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() at System.Web.UI.WebControls.DataBoundControl.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.AddedControl(Control control, Int32 index) at System.Web.UI.Control.EnsureChildControls() 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)Additional Info:MachineName : MyMachineTimeStamp : 1/20/2012 11:13:36 AMFullName : Telerik.Sitefinity.Utilities, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563AppDomainName : /LM/W3SVC/17/ROOT-1-129715315386278148ThreadIdentity : AnonymousWindowsIdentity : NT AUTHORITY\NETWORK SERVICERequested URL : http://staging.domain.com/Category: ErrorLogPriority: 0EventId: 90000Severity: ErrorTitle:Enterprise Library Exception HandlingMachine: YODAApp Domain: /LM/W3SVC/17/ROOT-1-129715315386278148ProcessId: 8940Process Name: c:\windows\system32\inetsrv\w3wp.exeThread Name: Win32 ThreadId:7756Extended Properties: ----------------------------------------Hello,
It seems that we have the same kind of error than you !
[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
System.Collections.Generic.List`1.set_Capacity(Int32 value) +62
System.Collections.Generic.List`1.EnsureCapacity(Int32 min) +34
System.Collections.Generic.List`1.Add(T item) +54
Telerik.Sitefinity.Modules.Pages.PageHelperImplementation.GetTemplates(PageNode pageNode) +66
Telerik.Sitefinity.Web.PageSiteNode.LoadPageData() +579
Telerik.Sitefinity.Web.PageSiteNode.get_Visible() +9
Telerik.Sitefinity.Web.UI.NavigationControls.InnerPageSiteNode.get_Visible() +18
Telerik.Sitefinity.Web.RouteHelper.CheckSiteMapNode(SiteMapNode pageSiteMapNode) +298
Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.CheckNode(SiteMapNode node) +68
Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.FilterNodes(SiteMapNodeCollection nodes, Boolean modifyCollection) +373
Telerik.Sitefinity.Web.UI.NavigationControls.Helper.FilterChildNodes(SiteMapNode node, SitefinitySiteMapDataSource dataSource) +325
Telerik.Sitefinity.Web.UI.NavigationControls.InnerPageSiteNode.get_ChildNodes() +29
Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.GetNodes(SiteMapNode node) +68
Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.GetNodes() +352
Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.GetPathNodeCollection(String viewPath) +46
Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource.GetView(String viewName) +40
System.Web.UI.WebControls.SiteMapDataSource.System.Web.UI.IDataSource.GetView(String viewName) +10
System.Web.UI.WebControls.ReadOnlyDataSource.System.Web.UI.IDataSource.GetView(String viewName) +8809165
System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +266
System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +19
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.AddedControl(Control control, Int32 index) +9041218
System.Web.UI.ControlCollection.Add(Control child) +79
Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +96
System.Web.UI.Control.EnsureChildControls() +102
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
Have you made any changes in your templates especially the navigation menu ?
If we go to the backoffice, the navigation widget can"t find top level page... It appear empty even if we delete and recreate it.. When we launch our page we get this OutOfMemory error...
We have sitefinity 4.4
Hi,
Hi Stanislav,
The duplicate template seems to have been the problem. It never occurred to me that even though the front end was bombing out within a few seconds that the back end would still work, but it did.
Thanks for the help.
Jacques