Windows Server 2008 IIS 併發請求設置

更新服務器的時候,忽然發現部分機器出現了錯誤,大體描述以下html

HTTP Error 503.2 - Service Unavailablewindows

正在超過 serverRuntime@appConcurrentRequestLimit 設置的值。服務器

....併發

服務器IIS基本都用的默認設置,爲了不下次再次出現此類錯誤,找了相關配置,提升IIS併發數量設置app

1. 修改IIS應用程序池隊列長度server

高級設置裏,隊列長度修改成 65535htm

2. 修改IIS的 appConcurrentRequestLimit 設置blog

 默認值是5000,修改成50000(或者更大的值)隊列

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

在%systemroot%\System32\inetsrv\config\applicationHost.config中能夠查看到該設置:get

<serverRuntime appConcurrentRequestLimit="50000" /> 

3. 修改machine.config中的processModel>requestQueueLimit的設置

 由原來的默認5000改成50000

<processModel enable="true" requestQueueLimit="50000"/>

4. 修改註冊表,調整IIS 7支持的同時TCPIP鏈接數

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

5. 重啓服務,設置生效 

net stop http  & net start  http & iisreset 

 微軟官方參考文章

Modifying the ASP.NET Request Queue Limit

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

Microsoft.com 微軟官網IIS應用程序池配置推薦,應用程序池配置項說明

Managing, Tuning, and Configuring Application Pools in IIS 7.0

相關文章
相關標籤/搜索