More in this section
Forums / Bugs & Issues / Exception of type 'System.OutOfMemoryException' was thrown.

Exception of type 'System.OutOfMemoryException' was thrown.

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
5 posts, 0 answered
  1. Juan Serna
    Juan Serna avatar
    3 posts
    26 Mar 2010
    31 Aug 2011
    Link to this post
    i getting this error, the website and the backend was working fine!, now as soon i try to access the front-end i get this error, if i type /sitefinity it works, put as soon i try to edit any page, i get the same error.

    any idea where i can start troubleshooting this issue.


    xception of type 'System.OutOfMemoryException' was thrown.

    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) +93
       Telerik.Sitefinity.Web.SitefinityRoute.GetRouteData(HttpContextBase httpContext) +316
       System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +285
       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. Juan Serna
    Juan Serna avatar
    3 posts
    26 Mar 2010
    31 Aug 2011
    Link to this post
    I found the issue,

    was related to some languages templates was overlapping.

  3. Silvain
    Silvain avatar
    3 posts
    22 Aug 2007
    12 Sep 2011
    Link to this post
    Hi Juan,

    Could you be a little more specific on the cause of the problems? I get a similar error (not always though) and I would love to find out where to look and how to solve it.

    Thanks and best regards,


  4. Jacques
    Jacques avatar
    427 posts
    28 Jun 2007
    20 Jan 2012
    Link to this post
    Yeah, any more help on this would be helpful.

    5 minutes ago our site was working fine, now suddenly the memory is being killed by something and Telerik's only input seems to be some phantom loop in a template??

  5. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    18 Sep 2017
    21 Jan 2012
    Link to this post

    The problem is usually caused by several things. The most possible one is because there is a page template using a master page based on itself. Can you review Design->Page Templates and check the column base on template and see if a template using a master page is based on itself. For example a template is using Page.master to create a template called MyTemplate and MyTemplate is based on a template called MyTemplate. This is causing a loop because MyTempalte is searching for MyTemplate which is also searching for MyTemplate and so on and this fills up all the server memory and the error is thrown.

    Another cause is if you are using a custom navigation widget on some of the pages and in the code behind of the control IsNodeAccessible property is used. This is not working properly in Sitefinity 4.2 and above so it is best to remove it. It is also causing a loop.

    Another cause is if using a widget that for example queries an image,document or video library and displays results on the frontend. Sitefinity API used for taking media content might be wrong and getting all images in the librari and then fitering them to show only a few (App.WorkWith().Images().Get().ToList and then filter with .Where() ).
    Kind regards,
    Stanislav Velikov
    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 posts, 0 answered