此监视器在应用程序池因超出内存配置阀值而被回收时查看记录的事件,并在应用程序池回收过于频繁时将其状态更改为警告(基于监视器的配置)。这是手动重置监视器,表示它不会自动切换到正常状态。要将监视器切换到正常状态,需要使用运行状况资源管理器重置监视器。
应用程序池回收太频繁,因为其虚拟或物理内存占用已达到配置限制。这可能表明应用程序池正在执行的代码中发生内存泄露。
此监视器的工作方式为查找大量由于达到配置的内存使用率阈值(在 IIS 管理工具中配置此值)导致的应用程序池回收事件。可为此监视器配置两个参数。第一个参数为“发生次数”,即此监视器正在查找的事件需要在配置的时间间隔内发生的次数。第二个参数为“分钟数”,即此监视器查找事件发生的时间间隔。
应用程序池正在执行的代码中发生内存泄露。
设置的物理或虚拟内存限制太低。
若要通过使用 IIS 管理器检查或配置应用程序池限制设置,请执行以下操作:
单击“开始”,再单击“控制面板”,然后单击“管理工具”。
右键单击“Internet Information Services (IIS) 管理器”并选择“以管理员身份运行”。
在左侧的“连接”窗格中,展开计算机,然后选择计算机名称下的“应用程序池”文件夹。
在“功能视图”中,选择应用程序池。在“操作”窗格中,选择“高级设置”。
在相应区段下检查或配置应用程序池限制的设置。
注意: 这是一个手动重置监视器,因此在解决此问题后,需要在运行状况资源管理器中重置此监视器的状态。通过右键单击此监视器并选择“重置运行状况”菜单项,可完成此操作。如果没有手动重置此监视器,它将不会切换到正常状态。
Target | Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Windows.InternetInformationServices.6.2.RepeatedEventLogManualReset2StateMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool.MemoryLeak.Monitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.Windows.InternetInformationServices.6.2.RepeatedEventLogManualReset2StateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool.MemoryLeak.Monitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="IISCommon!Microsoft.Windows.InternetInformationServices.ApplicationPool"]/PoolID$</AlertParameter1>
<AlertParameter2>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="PotentialMemoryLeakDetected" MonitorTypeStateID="RepeatedEventRaised" HealthState="Warning"/>
<OperationalState ID="Healthy" MonitorTypeStateID="ManualResetEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<RepeatedComputerName>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</RepeatedComputerName>
<RepeatedLogName>System</RepeatedLogName>
<RepeatedExpression>
<And>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(5117|5077)$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-WAS</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="IISCommon!Microsoft.Windows.InternetInformationServices.ApplicationPool"]/PoolID$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</RepeatedExpression>
<NumberOfSeconds>3600</NumberOfSeconds>
<NumberOfOccurrences>10</NumberOfOccurrences>
</Configuration>
</UnitMonitor>