为应用程序池“Classic .NET AppPool”提供服务的进程与Windows进程激活服务发生致命的通信错误

时间:2009-09-18 16:18:45

标签: asp.net http iis-7 http-status-code-503

我在Windows Server 2008上的IIS 7上运行ASP.NET 3.5 Web应用程序。

我今天下午早些时候收到了以下错误:

HTTP Error 503. The service is unavailable.

我查看了事件日志并发现:

A process serving application pool 'Classic .NET AppPool' suffered a fatal communication error with the Windows Process Activation Service. The process id was '3328'. The data field contains the error number.

以下是该事件的全部细节:

Log Name:      System
Source:        Microsoft-Windows-WAS
Date:          18/09/2009 14:58:31
Event ID:      5011
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      computername
Description:
A process serving application pool 'Classic .NET AppPool' suffered a fatal communication error with the Windows Process Activation Service. The process id was '3328'. The data field contains the error number.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-WAS" Guid="{5 .. 0}" EventSourceName="WAS" />
    <EventID Qualifiers="32768">5011</EventID>
    <Version>0</Version>
    <Level>3</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2009-09-18T13:58:31.000Z" />
    <EventRecordID>23552</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>System</Channel>
    <Computer>computername</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="AppPoolID">Classic .NET AppPool</Data>
    <Data Name="ProcessID">3328</Data>
    <Binary>6D000780</Binary>
  </EventData>
</Event>

这导致:

Application pool 'Classic .NET AppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

以下是该事件的全部细节:

Log Name:      System
Source:        Microsoft-Windows-WAS
Date:          18/09/2009 15:03:05
Event ID:      5002
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      computername
Description:
Application pool 'Classic .NET AppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-WAS" Guid="{5 .. 0}" EventSourceName="WAS" />
    <EventID Qualifiers="49152">5002</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2009-09-18T14:03:05.000Z" />
    <EventRecordID>23557</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>System</Channel>
    <Computer>computername</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="AppPoolID">Classic .NET AppPool</Data>
    <Binary>
    </Binary>
  </EventData>
</Event>

结束于:HTTP错误503.该服务不可用。

有人请帮助我确定这是如何发生的以及我需要采取哪些措施来防止它在将来发生。

6 个答案:

答案 0 :(得分:16)

这是一个非常讨厌的人。我建议使用IIS Debug Diagnostics工具。您可以通过关闭应用程序池属性中的“快速失败保护”来缓解症状,但这只会掩盖问题。发生了什么事情是你的应用程序经常/如此频繁地经历异常,以至于服务自行关闭。您需要运行诊断工具来捕获进出的所有内容,以找到发生的异常。

这可能是一项非常费力的任务,因为该工具将收集数十亿字节的垃圾进行筛选。如果你很幸运,关闭“快速失败保护”可能会允许异常进入浏览器,但我的猜测是服务器最终会挂起。

答案 1 :(得分:8)

如果您使用的是NServiceBus,请确保运行应用程序池的任何帐户都有权读取消息队列。

NServiceBus在应用程序启动时运行后台任务,在10秒后超时,导致w3wp进程在无法从队列中读取时被终止。在n(默认值为5)之后,w3wp崩溃快速失败保护启动并停止应用程序池。

http://blog.jonathanoliver.com/2010/11/nservicebus-w3wp-exe-processes-crashing/

答案 2 :(得分:7)

最有可能是由无限循环引起的。

(我遇到了同样的问题。)所以你只需要在代码中查找使用循环的位置,看看是否删除其中一个会阻止错误。一旦你找到了罪魁祸首,那么你可以试着找出什么导致它无限循环。

答案 3 :(得分:2)

我只是跟踪并修复了同样令人讨厌的问题。一些可能导致问题的事情:

  • Server.Transfer()循环
  • 在某些情况下调用CurrentThread.Abort()..(就像在Server.Transfer()之后!)

解决这些问题是为我们解决的问题。

答案 4 :(得分:0)

我遇到了这个问题,事件查看器“模块DLL C:\ Windows \ system32 \ RpcProxy \ RpcProxy.dll无法加载。数据是错误。”这篇文章有解决这个问题的步骤: http://forums.iis.net/t/1154189.aspx

答案 5 :(得分:0)

我现在在IIS-10 / Windows Server上遇到了同样的问题。 该应用程序在开发环境中运行良好,但在生产服务器中产生了错误。 我认为问题可能与某些内存/堆/堆栈管理有关。 发布发行版本而不是调试解决了该问题。 更详细:“高级构建设置” /“调试信息” /“完整”->“仅pdb”。

更新:第二天,我不小心又发布了一个调试版本。现在,正在运行的软件产生了一些不同的行为。现在的解决方案是禁用“检查算术上溢/下溢”(Build-> Advanced)(VS2013)