1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Exception of type 'System.OutOfMemoryException' was thrown

Exception of type 'System.OutOfMemoryException' was thrown

11 posts, 0 answered
  1. Ivan
    Ivan avatar
    3 posts
    Registered:
    09 Sep 2011
    10 Sep 2011
    Link to this post
    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
  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    13 Sep 2011
    Link to this post
    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
  3. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    20 Jan 2012
    Link to this post
    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?
  4. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    23 Jan 2012
    Link to this post
    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
  5. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    25 Jan 2012
    Link to this post
    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
  6. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    27 Jan 2012
    Link to this post
    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
  7. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    27 Jan 2012
    Link to this post
    Hi Victor,

    The version is SF 4.3

    Regards,
    Jacques
  8. Ivan
    Ivan avatar
    11 posts
    Registered:
    16 Jul 2010
    27 Jan 2012
    Link to this post
    Issue resolved! the problem was we was installing a template using itself, it was recycling and that's why the memory thrown down.
  9. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    30 Jan 2012
    Link to this post
    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
  10. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    31 Jan 2012
    Link to this post
    So does that mean there's a bug in the upgrade mechanism?
  11. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    02 Feb 2012
    Link to this post
    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
11 posts, 0 answered