對一台IIS 6進行壓力測試時,因壓力過大Web不支倒地,接著再連上Web,出現的都是HTTP 503 Service Unavailable。

查看Event可以看到5個接連的W3SVC Warning及一個W3SVC Error。

Warning Event 1011 from W3SVC 共有四個

伺服應用程式集區 'DefaultAppPool' 的處理序與 World Wide Web Publishing 服務通訊時發生嚴重錯誤。處理序識別碼為 '3808'。資料欄位含有錯誤號碼。
A process serving application pool ApplicationPool suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '3808'.

接著是Error Event 1002 from W3SVC

正在自動停止應用程式集區 'DefaultAppPool',因為在伺服該應用程式集區的處理序中發生許多失敗。
Application pool 'DefaultAppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

同事小熊子分享了他的經驗,原來這是IIS6所謂的Rapid Fail Protection保護機制。當IIS因為程式不良或遭到惡意攻擊時,造成Worker Process Crash,IIS會自動重啟一個新的Worker Process繼續提供服務;但如果新啟動的Worker Process接連Crash,IIS就會停用該Application Pool,以免持續不斷重啟新Worker Process的沈重負擔把Server搞掛(參考)。

預設值是5分鐘內發生5次異常就會觸發Rapid Fail Protection,這就是為什麼在事件簿中看到5個Warning+1個Error的理由。Rapid-Fail Protection的設定UI如下:


Comments

Be the first to post a comment

Post a comment