標籤:sof http asp 啟用 文章 controls strong lib html
轉自:http://www.cnblogs.com/yxlblogs/p/3330972.html
由於之前使用的是預設配置,伺服器最多隻能處理5000個同時請求,今天下午由於某種情況造成同時請求超過5000,從而出現了上面的錯誤。
為了避免這樣的錯誤,我們根據相關文檔調整了設定,讓伺服器從設定上支援10萬個並發請求。
具體設定如下:
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
5. 運行命令使用設定生效
net stop http & net start http & iisreset
完成上述4個設定,就可以支援10萬個並發請求,部落格園部落格伺服器已經啟用上述設定。
讓Windows Server 2008 + IIS 7+ ASP.NET 支援10萬並發請求