Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> 電腦軟體教學 >> 伺服器技術 >> 關於伺服器

IIS 日誌 Timer_MinBytesPerSecond / Timer_ConnectionIdle 錯誤根因與 Metabase 修復

編輯:關於伺服器

錯誤現象:IIS 日誌 (C:\Windows\System32\LogFiles\HTTPERR\httperr*.log) 大量出現:

  • Timer_MinBytesPerSecond
  • Timer_ConnectionIdle

根因分析

IIS 6.0 預設連接保護機制:

  • MinFileBytesPerSec = 240:連接最小傳輸速率 (bytes/sec),低於此值判定為惡意慢速攻擊或客戶端異常,切斷連接
  • ConnectionTimeout = 120 (秒):閒置連接最大保持時間

SUS (Software Update Services) 等大檔案下載場景,客戶端下載速度緩慢或連接長時間閒置,觸發保護機制導致斷連。

修復方案:編輯 Metabase.xml

  1. IIS 管理器 → 右鍵本機電腦 → 「屬性」 → 勾選「允許直接編輯配置資料庫」
  2. 編輯 C:\Windows\System32\inetsrv\MetaBase.xml
  3. 搜尋 MinFileBytesPerSec → 修改為 0 (禁用速率檢查)
  4. 搜尋 ConnectionTimeout → 修改為 600 (10 分鐘)
  5. 儲存,重啟 IIS Admin Service:net stop iisadmin && net start iisadmin

替代方案:ADSUtil.vbs 命令列修改

cscript adsutil.vbs set w3svc/MinFileBytesPerSec 0
cscript adsutil.vbs set w3svc/ConnectionTimeout 600

安全性權衡與最佳實踐

補充:Windows 2003 SP1+ 修正

部分 Timer_MinBytesPerSecond 為 http.sys 核心 Bug,安裝最新 Service Pack 可修復。

連接保護機制是防禦資源耗盡攻擊的關鍵防線,調整前務必評估業務流量特徵與威脅模型。
Copyright © Windows教程網 All Rights Reserved
策略優點風險建議
禁用速率檢查 (0)解決大檔下載斷連易受 Slowloris/慢速攻擊僅內網/受信環境,或配合 WAF 速率限制
調大閾值 (如 50)平衡防護與相容仍可能誤殺配合實際業務基線調整
保持預設 + WAF 防護安全性最佳需額外部署 WAF生產環境首選