- 时间:2020-03-18 21:48 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:让Win2008+IIS7+ASP.NET支持10万并发请求
今天下午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中可以查看到该设置:
[url=http://technet.microsoft.com/en-us/library/dd425294(office.13).aspx]http://technet.microsoft.com/en-us/library/dd425294(office.13).aspx[/url]
4. 修改注册表,调整IIS 7支持的同时TCPIP连接数
由原来的默认5000改为100000。
[url=http://stackoverflow.com/questions/612242/iis-7-0-503-errors-with-generic-handler-ashx-implementing-ihttpasynchandler]IIS 7.0 503 errors with generic handler (.ashx) implementing IHttpAsyncHandler[/url]
[url=http://blogs.technet.com/winserverperformance/archive/2008/07/25/tuning-windows-server-2008-for-php.aspx]Tuning Windows Server 2008 for PHP[/url]
微信版

扫一扫进微信版
返回顶部