当前位置: 移动技术网 > 网络运营>服务器>Windows > 让Win2008+IIS7+ASP.NET支持10万并发请求

让Win2008+IIS7+ASP.NET支持10万并发请求

2019年04月18日  | 移动技术网网络运营  | 我要评论
今天下午17点左右,博客园博客站点出现这样的错误信息:

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:\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"/>


参考文章:

4. 修改注册表,调整iis 7支持的同时tcpip连接数

由原来的默认5000改为100000。

复制代码 代码如下:

reg add hklm\system\currentcontrolset\services\http\parameters /v maxconnections /t reg_dword /d 100000


完成上述4个设置,就可以支持10万个并发请求,博客园博客服务器已经启用上述设置。

参考文章:



如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网