Exception of type 'System.OutOfMemoryException' was

Posted by Community Admin on 03-Aug-2018 00:26

Exception of type 'System.OutOfMemoryException' was thrown

All Replies

Posted by Community Admin on 10-Sep-2011 00:00

Hi, at this moment i'm experiencing memory problems, below is the stack trace of this issue. Our server is using 4gb of memory. I can log in, access dashboard and get into Pages or Page Templates, but when I hit to a page or template, it takes too long and throw me the bellow message.

Thanks for help!



Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[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.PageHelper.GetTemplates(PageNode pageNode) +64
   Telerik.Sitefinity.Web.PageSiteNode.LoadPageData() +762
   Telerik.Sitefinity.Web.SiteMapBase.FindSiteMapNodeForSpecificLanguage(SiteMapNode node, CultureInfo cultureInfo) +92
   Telerik.Sitefinity.Web.SitefinityRoute.GetRouteData(HttpContextBase httpContext) +316
   System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +287
   System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +60
   System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +86
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Posted by Community Admin on 13-Sep-2011 00:00

Hello Ivan,

From the look of the stack trace seems that a template is causing an internal loop which fills the memory of the server thus throwing an exception.

Please check if you have any layout controls that might be causing the issue or if you have applied other changes to the masterpage that you use for your pages.

Greetings,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 20-Jan-2012 00:00

Hi Ivan,

That's too vague a statement to make: "a template is causing an internal loop". How does a template suddenly cause an internal loop?

We're experiencing the problem right now where 5 minutes ago the site worked fine, but now it's falling over constantly with this exception.

When looking at the server memory we can see how the memory is quadrupling with in a matter of seconds. This is a page and template that worked not 5 minutes ago. How is it possible that this can suddenly happen with no changes having been made to it?

Posted by Community Admin on 23-Jan-2012 00:00

Hello Jacques,

I see that you are communicating with a colleague of mine regarding the issue. If possible Ivan can share with us what was the cause for the problem, so you can verify whether the case is the same with you.

All the best,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 25-Jan-2012 00:00

Hi Victor,

It would seem that the cause was a template in an infinite loop.
Would it not make sense then to have a check in Sitefinity to make sure the administrator is not aloud to create a template based on itself?

Regards,
Jacques

Posted by Community Admin on 27-Jan-2012 00:00

Hi Jacques,

There was a bug related to such scenario, which was later fixed. Can you tell us which version of Sitefinity you have used to replicate the issue?

All the best,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 27-Jan-2012 00:00

Hi Victor,

The version is SF 4.3

Regards,
Jacques

Posted by Community Admin on 27-Jan-2012 00:00

Issue resolved! the problem was we was installing a template using itself, it was recycling and that's why the memory thrown down.

Posted by Community Admin on 30-Jan-2012 00:00

Hi all,

@Jackques: the error should not be present in the version you speak of, however if your project has been upgraded from a previous version of Sitefinity, you may experience the issue.

All the best,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 31-Jan-2012 00:00

So does that mean there's a bug in the upgrade mechanism?

Posted by Community Admin on 02-Feb-2012 00:00

Hi Jacques,

This hardly can be considered as a bug, as in 4.2+ we have made some changes which will detect such issues and throw the OutofMemoryException. If you have a template that is based on another template - it is completely ok, but if the initial template is based on the newer template all pages associated with the second one will throw the error, because of the internal loop that will be caused.

All the best,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed