3

我在 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 内存消耗限制。

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

4

1 回答 1

4

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

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

在 machine.config 文件中有一个名为“processModel”的部分,默认情况下它看起来像这样:

<processModel autoConfig="true"/>

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

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

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

于 2012-10-29T16:50:13.213 回答