让Windows Server 2008 + IIS 7+ ASP.NET 支持10万个同时请求

楼主
让Windows Server 2008 + IIS 7+ ASP.NET 支持10万个同时请求

[P][/P][P][P][P]今天下午17点左右,博客园博客站点出现这样的错误信息:[/P][P][BGCOLOR=rgb(238, 238, 238)][P][B]Error Summary:[/B][/P][P]HTTP Error 503.2 - Service Unavailable
The serverRuntime@appConcurrentRequestLimit setting is being exceeded. [/P][P][B]Detailed Error Information:[/B][/P][P]Module IIS Web Core
Notification BeginRequest
Handler StaticFile [/P][P]Error Code 0x00000000[/P][/BGCOLOR][/P][P]由于之前使用的是默认配置,服务器最多只能处理5000个同时请求,今天下午由于某种情况造成同时请求超过5000,从而出现了上面的错误。[/P][P]为了避免这样的错误,我们根据相关文档调整了设置,让服务器从设置上支持10万个同时请求。[/P][P]具体设置如下:[/P][P][B]1. 调整IIS 7应用程序池队列长度[/B][/P][P]由原来的默认1000改为65535。[/P][P]IIS Manager > ApplicationPools > Advanced Settings[/P][P][BGCOLOR=rgb(238, 238, 238)]Queue Length : 65535[/BGCOLOR][/P][P][B]2.  调整IIS 7的appConcurrentRequestLimit设置[/B][/P][P]由原来的默认5000改为100000。[/P][P][BGCOLOR=rgb(238, 238, 238)]c:\windows\system32\inetsrv\appcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000[/BGCOLOR][/P][P]在%systemroot%\System32\inetsrv\config\applicationHost.config中可以查看到该设置:[/P][P][P][COLOR=rgb(0, 0, 255)]<[/COLOR][COLOR=rgb(128, 0, 0)]serverRuntime [/COLOR][COLOR=rgb(255, 0, 0)]appConcurrentRequestLimit[/COLOR][COLOR=rgb(0, 0, 255)]="100000"[/COLOR][COLOR=rgb(255, 0, 0)] [/COLOR][COLOR=rgb(0, 0, 255)]/>[/COLOR] [/P][/P][P][B]3. 调整machine.config中的processModel>requestQueueLimit的设置[/B][/P][P]由原来的默认5000改为100000。[/P][P][COLOR=rgb(0, 0, 255)]<[/COLOR][COLOR=rgb(128, 0, 0)]configuration[/COLOR][COLOR=rgb(0, 0, 255)]>[/COLOR]
    [COLOR=rgb(0, 0, 255)]<[/COLOR][COLOR=rgb(128, 0, 0)]system[/COLOR][COLOR=rgb(255, 0, 0)].web[/COLOR][COLOR=rgb(0, 0, 255)]>[/COLOR]
[BGCOLOR=rgb(238, 238, 238)]        [/BGCOLOR][BGCOLOR=rgb(238, 238, 238)][COLOR=rgb(0, 0, 255)]<[/BGCOLOR][/COLOR][BGCOLOR=rgb(238, 238, 238)][COLOR=rgb(128, 0, 0)]processModel [/BGCOLOR][/COLOR][BGCOLOR=rgb(238, 238, 238)][COLOR=rgb(255, 0, 0)][/BGCOLOR][/COLOR][BGCOLOR=rgb(238, 238, 238)][COLOR=rgb(255, 0, 0)]requestQueueLimit[/BGCOLOR][/COLOR][BGCOLOR=rgb(238, 238, 238)][COLOR=rgb(0, 0, 255)]="100000"[/BGCOLOR][/COLOR][BGCOLOR=rgb(238, 238, 238)][COLOR=rgb(0, 0, 255)]/>[/BGCOLOR][/COLOR]  [P][URL=http://www.cnblogs.com/dudu/archive/2009/11/10/1600062.html]复制代码[/URL][/P][/P][P]参考文章:[URL=http://technet.microsoft.com/en-us/library/dd425294(office.13).aspx]http://technet.microsoft.com/en-us/library/dd425294(office.13).aspx[/URL][/P][P][B]4. 修改注册表,调整IIS 7支持的同时TCPIP连接数[/B][/P][P]由原来的默认5000改为100000。[/P][P][BGCOLOR=rgb(238, 238, 238)]reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v MaxConnections /t REG_DWORD /d 100000 [/BGCOLOR][/P][P]完成上述4个设置,就可以[FACE=lucida grande][SIZE=13px]支持10万个同时请求,[LINE-HEIGHT=21px][FACE=verdana,"][SIZE=14px]博客园博客服务器已经启用上述设置。 [/SIZE][/FACE][/SIZE][/FACE][/LINE-HEIGHT][/P][P][B]参考文章:[/B][/P][P][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][/P][P][URL=http://blogs.technet.com/winserverperformance/archive/2008/07/25/tuning-windows-server-2008-for-php.aspx]Tuning Windows Server 2008 for PHP[/URL] [/P][P]
[/P][P]from http://www.cnblogs.com/dudu/archive/2009/11/10/1600062.html[/P][/P][/P]
1楼
[P]这个,很好,很强大,,[/P]
2楼
一个鸟人都没有

电脑版 Page created in 0.0625 seconds with 4 queries.