How is IIS configured when the server load is high or the request queue is full ??

aspx 6 Reputation points
2022-01-06T11:48:39.24+00:00

How is IIS configured when the server load is high or the request queue is full and the client requests reject 503 instead of continuing to receive new requests ?

1 . IIS->Application Pools->TestSite->Advanced Settings->Queue Length (default value:65535)
2. IIS->TestSite->Manage Website->Advanced Settings->Limits->Maximum Concurrent Connections (default value:4294967295)

In addition, what other queue configurations can be set? ?

Ask professionals to give pointers,please...

Windows development Internet Information Services
Developer technologies ASP.NET Other
Developer technologies C#
{count} votes

5 answers

Sort by: Most helpful
  1. aspx 6 Reputation points
    2022-01-06T11:50:19.913+00:00
    0 comments No comments

  2. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-01-06T19:12:27.513+00:00

    in general, you would not tweak the IIS settings, but fix the code.

    if you have high queue depth, then your code has too many sync operations, too compute bound, or is too slow and needs to be corrected.

    to improve performance, you determine what resource is exhausted/slowest first, then improve.

    server resources to monitor

    1) cpu. once you hit 100%, improve code, or add cpu / servers
    2) network. one the network interfaces is maxed, add network interfaces
    3) disk maxed, add drives
    4) paging high - add memory
    5) database - distribute or add caching

    0 comments No comments

  3. aspx 6 Reputation points
    2022-01-07T10:09:30.98+00:00

    thank you..

    Microsoft official documentation, the principles and architecture of IIS, is not systematic,scattered,stale, too many configuration, confusingly , is a black box.

    1. IIS->TestSite->Manage Website->Advanced Settings->Limits->Maximum Concurrent Connections (default value:4294967295)
    2. IIS->Application Pools->TestSite->Advanced Settings->Queue Length (default value:65535)IIS http.sys
    3. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config

    <system.web><processModel
    enable = "true" [true|false]
    requestLimit = "2147483647" [number]
    requestQueueLimit = "5000" [number]
    memoryLimit = "60" [number]
    webGarden = "false" [true|false]
    cpuMask = "0xffffffff" [number]
    autoConfig = "false" [true|false]
    maxWorkerThreads = "20" [number]
    maxIoThreads = "20" [number]
    minWorkerThreads = "1" [number]
    minIoThreads = "1" [number]
    maxAppDomains = "2000" [number] .....
    /></system.web>
    https://learn.microsoft.com/zh-cn/biztalk/technical-guides/optimizing-iis-performance

    4.IIS thread pool configuration
    HKLM\System\CurrentControlSet\Services\InetInfo\Parameters
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\MaxPoolThreads (REG_DWORD)
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\PoolThreadLimit (REG_DWORD)
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\ThreadTimeout (REG_DWORD)
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\ThreadPoolStartupThreadCount (REG_DWORD)
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\ThreadPoolMaxCPU (REG_DWORD)
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\ThreadPoolStartDelay (REG_DWORD)
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\ThreadPoolExactThreadCount (REG_DWORD)
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\MaxConcurrency (REG_DWORD)

    5.appConcurrentRequestLimit
    C:\Windows\System32\inetsrv\config\applicationHost.config
    <system.webServer><serverRuntime enable="true" appConcurrentRequestLimit="5000" /> </system.webServer>

    1. ASP.NET 4 MaxConcurrentRequests
      <system.web><applicationPool maxConcurrentRequestsPerCPU="5000" maxConcurrentThreadsPerCPU="0" requestQueueLimit="5000" /></system.web>

    @Bruce (SqlWork.com)

    0 comments No comments

  4. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2022-01-08T03:28:59.177+00:00

    IIS is old. Originally windows only supported 256 network connections, and 2gb virtual user memory

    A current version of windows has fewer resource limitations and is largely self tuning. So the default iis settings are the max.

    Typically iis is not the limiting factor. For .net web sites the ,net 4.* asp.net pipeline design was the main system limitation. If you are using the 4.* framework than this framework is the system limitation. You should start with the defaults. In general increasing thread pool counts reduce performance and only used to fix poorly written code. Adding web gardens may also help with a class of poorly written applications where the requests take too long to process, but not cpu bound.

    The .net core pipeline is orders of magnitude improvement in request processing than the old pipeline. So now the code design is truly the limiting factor, not iis or the asp.net processing pipeline.

    In short, if you have performance issues, it’s likely your code.


  5. Ken Tucker 5,861 Reputation points
    2022-01-10T10:28:40.103+00:00

    If your web server call not handle all the traffic I would recommend setting up a load balancer so you can spread the traffic over more than one server.

    https://learn.microsoft.com/en-us/iis/web-hosting/scenario-build-a-web-farm-with-iis-servers/configuring-step-3-configure-iis-web-farm-load-balancing


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.