IIS日志Timer_MinBytesPerSecond,Timer_ConnectionIdle的解決方法
2020-10-22 19:03:48
供稿:網(wǎng)友
Description: The Error means The connection with the server has been terminated.
問題描述:這個錯誤是由于服務器連接被中斷導致的。
If you check out the C:"Windows"system32"LogFiles"HTTPERR"httperr*.log files on the distribution server, you'll likely see either Timer_MinBytesPerSecond errors or Timer_ConnectionIdle errors. These are caused by IIS' default settings, contained within its metabase, which define the minimum traffic flow rate for a connection to be kept alive and the maximum idle time allowed before a connection is dropped. For some reason, SUS servers seem to take their good old time while downloading updates, and these parameters are exceeded and the distribution server drops 'em.
這個問題是由于在某些應用下,IIS的默認設置不當?shù)?
1) From IIS Manager, right click on the Internet Information Server (IIS) Manager root level folder and go to Properties. Check the box to enable direct metabase editing. Click OK.
1)打開Internet 信息服務(IIS)管理器,右鍵點“我的計算機”——屬性,選上“允許直接編輯配置數(shù)據(jù)庫(N)”,確定。
2) Open the C:"Windows"system32"inetsrv"MetaBase.xml file in Notepad. Do a search for "MinFileBytesPerSec". Change the setting for MinFileBytesPerSec from 240 to 0. Do another search, this time for "ConnectionTimeout" to be 600. Save changes and exit.
2)編輯C:"Windows"system32"inetsrv"MetaBase.xml文件,把MinFileBytesPerSec 參數(shù)值從240改為0,把ConnectionTimeout參數(shù)設成600。
3) Restart the IIS Admin service to effect the changes.
3)重新起動IIS服務
替代方法
如果您安裝最新 for Windows Server 2003, ServicePack 后問題仍然存在網(wǎng)絡連接可能太慢。 使用網(wǎng)絡跟蹤來確定客戶是否接收響應和重傳數(shù)據(jù)包中延遲。 要變通解決此問題, 減少或禁用 IIS 6.0 以阻止從早關閉慢速客戶連接中 MinFileBytesPerSec 屬性。
其它網(wǎng)友對該解決辦法的評價和心得:
覺得這些解決方法都有問題,假如車輛防盜警報經(jīng)常響,正確的解決方法是看看有誰常來打你車子的主意,或者把車子放在更安全的地方,而絕對不是關掉警報。
因為HTTP服務需要占用TCP連接,而TCP連接時是需要占用系統(tǒng)資源的,而且IIS為每個連接也需要分配相應的資源。目前的主機能夠處理上萬的連接就可以說是軟硬件設計都很不錯了(可以參見C10K )。假如惡意人員通過一臺或者多臺機器發(fā)起大量的連接,而不請求內容(這樣不需要消耗多少攻擊機器的帶寬),就可以大量消耗服務器資源而達到拒絕服務的目的。
所以 IIS 需要關閉長時間非活動的連接,這個就是Timer_ConnectionIdle 的錯誤由來。
原來以為攻擊者可以給服務器故意緩慢的發(fā)送和接收內容而消耗服務器的資源,這樣可以避免服務器對于Timer_ConnectionIdle 的保護,相應的IIS的防范就是 MinFileBytesPerSec 設置,MinFileBytesPerSec 屬性通過以最小的數(shù)據(jù)量保持連接,來禁止惡意的或軟件工作不正常的客戶端消耗資源。如果吞吐量低于 MinFileBytesPerSec 設置的值,則終止連接。LOG里面就會顯示Timer_MinBytesPerSecond錯誤(一些Timer_MinBytesPerSecond錯誤是因為 windows 2003 的http.sys錯誤引起的,解決方式是打上最新 ServicePack