windows 2008 R2 在訪問的時候經常會出理 503錯的解決方案
Error Summary:
HTTP Error 503.2 - Service Unavailable
The serverRuntime@appConcurrentRequestLimit setting is being exceeded.
Detailed Error Information:
Module IIS Web Core
Notification BeginRequest
Handler StaticFile
Error Code 0x00000000
由於之前使用的是預設配置,伺服器最多隻能處理5000個同時請求,今天下午由於某種情況造成同時請求超過5000,從而出現了上面的錯誤。
為了避免這樣的錯誤,我們根據相關文檔調整了設定,讓伺服器從設定上支援10萬個同時請求。
具體設定如下:
1. 調整IIS 7應用程式集區隊列長度
由原來的預設1000改為65535。
IIS Manager > ApplicationPools > Advanced Settings
Queue Length : 65535
2. 調整IIS 7的appConcurrentRequestLimit設定
由原來的預設5000改為100000。
c:windowssystem32inetsrvappcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000
在%systemroot%System32inetsrvconfigapplicationHost.config中可以查看到該設定:
3. 調整machine.config中的processModel>requestQueueLimit的設定
由原來的預設5000改為100000。
複製代碼
參考文章:http://technet.microsoft.com/en-us/library/dd425294(office.13).aspx
4. 修改註冊表,調整IIS 7支援的同時TCPIP串連數
由原來的預設5000改為100000。
reg add HKLMSystemCurrentControlSetServicesHTTPParameters /v MaxConnections /t REG_DWORD /d 100000
完成上述4個設定,就可以支援10萬個同時請求,西西軟體伺服器已經啟用上述設定。