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

解決 Windows Server 2008 R2 IIS 7.5 HTTP 503.2 服務不可用:調整 appConcurrentRequestLimit、應用程式集區佇列、machine.config、HTTP.sys 登錄

編輯:Server 2008

Windows Server 2008 R2 IIS 7.5 預設同時請求上限 5,000,高併發場景 (如秒殺、爬蟲洪峰) 易觸發 HTTP 503.2 - Service Unavailable: The serverRuntime@appConcurrentRequestLimit setting is being exceeded。本文提供四層調整將上限提升至 100,000:應用程式集區佇列長度、IIS appConcurrentRequestLimit、ASP.NET machine.config requestQueueLimit、HTTP.sys 登錄 MaxConnections。

錯誤詳細資訊

Module: IIS Web Core
Notification: BeginRequest
Handler: StaticFile
Error Code: 0x00000000

四層調整指令與設定

1. 應用程式集區佇列長度

IIS 管理員 → 應用程式集區 → 進階設定 → 佇列長度: 1000 → 65535

2. IIS serverRuntime appConcurrentRequestLimit

c:\windows\system32\inetsrv\appcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000

驗證:%systemroot%\System32\inetsrv\config\applicationHost.config 中 <serverRuntime appConcurrentRequestLimit="100000" />

3. ASP.NET machine.config processModel requestQueueLimit

檔案路徑:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config (或 v2.0 目錄)
修改:<processModel requestQueueLimit="100000" /> (預設 5000)

4. HTTP.sys 登錄 MaxConnections

reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v MaxConnections /t REG_DWORD /d 100000

參考文獻

Microsoft Technet: https://technet.microsoft.com/en-us/library/dd425294(office.13).aspx

效能調校提醒:
- 併發上限提升需配合硬體資源 (CPU 核心、記憶體、網卡佇列、TCP 連線表大小)
- 建議同步調整 TcpTimedWaitDelay、MaxUserPort 登錄值擴大連接埠範圍
- 啟用 IIS 輸出快取、動態壓縮、ARR 伺服器陣列分流可進一步提升承載能力
- 生產環境變更前請在測試環境壓力測試驗證穩定性
Copyright © Windows教程網 All Rights Reserved