【问题标题】:how to resolve memory consumption exceeding limit in asp.net?如何解决asp.net中超出限制的内存消耗?
【发布时间】:2012-09-28 14:22:38
【问题描述】:

我在 asp.net[.net 4 框架和 Visual Studio 2010] 中创建了一个 Web 应用程序。现在我使用 IIS 5.1 版本运行。当我运行我的应用程序时,我收到以下错误

Server Application Unavailable
 The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

我还使用 EventViewer 检查...它说

Event Type: Error
Event Source:   ASP.NET 4.0.30319.0
Event Category: None
Event ID:   1001
Date:       8/10/12
Time:       9:55:47 AM
User:       N/A
Computer:   SARAVANAN-
Description:
aspnet_wp.exe  (PID: 1724) was recycled because memory consumption exceeded the 1221 MB (60 percent of available RAM).

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

我不知道如何解决这个问题?有什么方法可以增加我的 IIS 的 RAM 内存消耗限制。

请指导我摆脱这个问题...

【问题讨论】:

标签: asp.net .net iis iis-6


【解决方案1】:

底线 - 你应该调试代码,看看为什么它会占用这么多内存。

但是要回答您的实际问题,是的,有一种方法可以提高此限制。

在 machine.config 文件中有一个名为“processModel”的部分,默认情况下如下所示:

<processModel autoConfig="true"/>

如果您更改它以添加“memoryLimit”值,这将修改用于确定何时回收进程的百分比值。例如:

<processModel autoConfig="true" memoryLimit="90"/>

这将允许进程在进程被回收之前消耗 90% 的可用 RAM。默认值为“60”。当然,您也可以设置较低的值。

【讨论】:

    猜你喜欢
    • 2022-10-05
    • 1970-01-01
    • 2015-11-30
    • 1970-01-01
    • 2017-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-26
    相关资源
    最近更新 更多