在asp.net mvc3中调用@RenderBody()时内存不足 [英] out of memory exception while calling @RenderBody() in asp.net mvc3

查看:154
本文介绍了在asp.net mvc3中调用@RenderBody()时内存不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everybody,

我在asp.net mvc3中调用@RenderBody()方法时遇到问题。问题是在调用@RenderBody()时抛出了内存不足异常。当内容视图包含较少的数据时,它可以正常工作,但是当负载很高时,会看到异常。



谢谢

Roman Raj Bajracharya

Hello Everybody,
I''m having a problem while the @RenderBody() method is being called in asp.net 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.

Thanks
Roman Raj Bajracharya

推荐答案

您有两种情况中的一种发生。我认为第一个很可能是基于你对负载很高的评论。

1)你试图处理太多数据。也许您的服务器没有足够的资源来处理正在通过的卷数据和请求。要么你为每个请求使用了太多的资源,要么你只有太多的请求而硬件无法处理它们。

2)如果无限循环,你也会得到这个错误情景发生。由于它不会一直发生,它可能与基于数据值的递归调用有关。在这种情况下,数据行导致对另一行数据的递归调用,这反过来导致对原始行或其自身的调用再次被反复调用。最终,内存不足。
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.


这篇关于在asp.net mvc3中调用@RenderBody()时内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆