Click here to Skip to main content
11,922,641 members (31,994 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET MVC3
Hello Everybody,
I'm having a problem while the @RenderBody() method is being called in mvc3. The problem is that out of memory exception is being thrown while calling @RenderBody(). When the content view contains lesser data, it works perfectly but as the load is high, the exception is seen.

Roman Raj Bajracharya
Posted 4-Feb-13 2:44am
JemiM 4-Feb-13 7:53am
Please post your code
ryanb31 4-Feb-13 8:07am
If it only happens when the load is high, it may have nothing to do with your code, it may just be that your server does not have the resources.
JemiM 4-Feb-13 8:16am
on what basis load is high?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You have 1 of two situations occurring. I believe that the first is most likely based on your comment about the "load is high".
1) You are trying to process too much data. Perhaps your server doesn't have the resources to handle the volume data and requests that are coming through. Either you are using too many resources for each request, or you just have too many requests and the hardware can't handle them all.
2) You could get this error as well if an infinite loop scenario takes place. As it doesn't happen all the time, it would likely be related to recursive calls based on data values. In this scenario and row of data causes a recursive call to another row of data which in turn causes a call to the original row or itself to be called again and again recusively. Eventually, out of memory occurs.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151125.1 | Last Updated 4 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100