1. 調整IIS 7應用程序池隊列長度
由原來的默認1000改為65535。
IIS Manager > ApplicationPools > Advanced Settings
Queue Length : 65535
2. 調整IIS 7的appConcurrentRequestLimit設置
由原來的默認5000改為100000。
c:\windows\system32\inetsrv\appcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000
在%systemroot%\System32\inetsrv\config\applicationHost.config中可以查看到該設置:
碼如下:
<serverRuntime appConcurrentRequestLimit="100000" />
3. 調整machine.config中的processModel>requestQueueLimit的設置
由原來的默認5000改為100000。
代碼如下:
<configuration> <system.web> <processModel enable="true" requestQueueLimit="100000"/>
參考文章:http://technet.microsoft.com/en-us/library/dd425294(office.13).aspx
4. 修改注冊表,調整IIS 7支持的同時TCPIP連接數
由原來的默認5000改為100000。
代碼如下:
reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v MaxConnections /t REG_DWORD /d 100000
完成上述4個設置,就可以支持10萬個並發請求,博客園博客服務器已經啟用上述設置。