您可定期回收 Internet Information Services (IIS) 應用程式集區,以避免產生可能導致應用程式損毀、當機或記憶體流失的不穩定狀態。應用程式集區回收作業預設為彼此重疊進行,這表示要關閉的工作者處理序會持續執行,直到有新的工作者處理序啟動為止。在新的工作者處理序啟動之後,系統便會對其傳遞新的要求。舊的工作者處理序在完成現有要求的處理工作之後或設定的逾時期間結束後便會關閉,以先發生者為優先。這種回收方式可確保對用戶端提供不中斷的服務。不過,如果應用程式集區中有應用程式在某個時間無法執行其本身的多個執行個體,則可停用重疊輪替。
停止和啟動 WAS
如果 WAS 無法回收應用程式集區,問題可能會自行解決。如果問題持續存在,可能的解決方式是停止並重新啟動 WAS。停止 WAS 服務也會同時停止 World Wide Web Publishing 服務 (W3SVC) 和相依於 WAS 的所有其他服務。因此,您可能也必須啟動其他的這些服務。
停止和啟動 WAS:
開啟提高權限的 [命令提示字元] 視窗。按一下 [開始],指向 [所有程式],按一下 [附屬應用程式],以滑鼠右鍵按一下 [命令提示字元],然後按一下 [以系統管理員身分執行]。
在命令提示字元中鍵入 net stop was /y。
在命令提示字元中鍵入 net start was。
若要重新啟動 W3SVC,請從命令提示字元輸入 net start w3svc。此外,也請啟動在 WAS 關閉時停止的所有其他服務。
Target | Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool |
Category | Alert |
Enabled | True |
Alert Generate | False |
Remotable | True |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.Server.IIS.6.2.WarningAndErrorEventProvider | Default |
Filter | ConditionDetection | Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool.EventFilter | Default |
WA | WriteAction | Microsoft.Windows.Server.IIS.6.2.GenerateAlertAction.SuppressedByDescription | Default |
<Rule ID="Microsoft.Windows.InternetInformationServices.6.2.WAS.failed.to.issue.recycle.request.to.application.pool" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.Windows.Server.IIS.6.2.WarningAndErrorEventProvider">
<LogName>System</LogName>
</DataSource>
</DataSources>
<ConditionDetection ID="Filter" TypeID="Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool.EventFilter">
<Expression>
<And>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(5070|5093)$</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>
</And>
</Expression>
</ConditionDetection>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.IIS.6.2.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.6.2.WAS.failed.to.issue.recycle.request.to.application.pool.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>