IIS的默认设置只能支持很小的访问量,访问量大了(比如每秒几千)就会不响应,可以通过下面的设置使IIS支持高并发访问
1.调整IIS应用程序池队列长度:
IIS管理——>应用程序池——高级设置 队列长度:65535
2.调整IIS的appConcurrentRequestLimit设置 默认值为5000,修改为10万 在cmd中执行下面语句
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,修改为10万
<configuration> <system.web> <processModel enable="true" requestQueueLimit="100000"/>
4.修改注册表,调整IIS 7支持的同时TCPIP连接数 默认值5000,修改为10万
reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v MaxConnections /t REG_DWORD /d 100000
5.重启服务使生效
net stop http & net start http & iisreset
本文作者:老徐 本文链接:https://bigger.ee/archives/29.html 转载时须注明出处及本声明
本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。
我来说两句