Let Win2008+IIS7+ ASP.NET support 100 000 concurrent requests

  • 2020-05-09 19:41:35
  • OfStack

Around 17:00 this afternoon, the bloggarden blog site received this error message:

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

Because we used the default configuration before, the server can only handle 5000 simultaneous requests at most. This afternoon, due to some circumstances, the number of simultaneous requests exceeded 5000, resulting in the above error.

To avoid this error, we adjusted the Settings according to the relevant documentation to allow the server to support 100,000 concurrent requests from the Settings.

The specific Settings are as follows:

Adjust the length of the IIS 7 application pool queue

Change the default from 1000 to 65535.

IIS Manager > ApplicationPools > Advanced Settings

Queue Length : 65535

2. Adjust appConcurrentRequestLimit Settings for IIS 7

Change the default from 5000 to 100000.

c:\windows\system32\inetsrv\appcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000

This setting can be viewed in %systemroot%\System32\inetsrv\config\ applicationHost.config:

 
<serverRuntime appConcurrentRequestLimit="100000" /> 


3. Adjust machine. processModel in config > The setting of requestQueueLimit

Change the default from 5000 to 100000.

 
<configuration> 
<system.web> 
<processModel enable="true" requestQueueLimit="100000"/> 


Refer to the article: http: / / technet microsoft. com/en - us/library dd425294 (office. 13). aspx

4. Modify the registry to adjust the number of TCPIP connections while IIS 7 is supported

Change the default from 5000 to 100000.

 
reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v MaxConnections /t REG_DWORD /d 100000 


After completing the above four Settings, you can support 100,000 concurrent requests. The blog garden blog server has enabled the above Settings.

Reference article:

IIS 7.0 503 errors with generic handler (.ashx) implementing IHttpAsyncHandler

Tuning Windows Server 2008 for PHP

Related articles: