About the IIS site request queue length?

aspx 6 Reputation points
2021-12-27T08:19:18.123+00:00

OS: Windows Server 2016 Standard
IIS: Version 10.0.14393.0
Web Sites: WebIISQueueTest .NetFramework4.5 Asp.net mvc

Question 1: By which performance counter does the site's request queue length be monitored?

Question 2: The request queue length is set but can be exceeded, why not return 503.

Performance counters HTTP Service Request Queues (CurrentQueueSize): The request count in the IIS queue on windows server 2016

The CurrentQueueSize property always has a zero value , why ?

application pool img: https://i.stack.imgur.com/k8tsS.png

160468-iis-app-pool.png

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,509 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,015 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
343 questions
0 comments No comments
{count} votes

12 answers

Sort by: Most helpful
  1. aspx 6 Reputation points
    2021-12-28T04:09:02.343+00:00

    Only ArrivalRate has A value, CurrentQueueSize property always has a zero value , what is their relationship to [Advanced Settinngs->Queue Length]?

    160804-%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE-20211228114613.png

    1 person found this answer helpful.
    0 comments No comments

  2. Zdravko Stojkoski 6 Reputation points
    2022-07-23T12:58:56.593+00:00

    Ill try to be of some assistance to point out what you (and I) were failing to realize.

    The issue is here that the iis setting is for the MAX que size, ie how many can go INTO the que. i had mine set to 10,000 form the default 1,000.
    People said it was too big, so i used the profiler to find this actual values, and to my surprise it was always 0... i instantly thought, its not logging correct.

    However, as i played with the site and was restarting app pools i would notice a small value would register, during a recent outage the value went up quite a bit.

    The reason for this is simple, what tells it to que things? IIS will try to process as many as it can based on a value called, maxConcurrentRequestsPerCPU, before offloading to the que.

    <applicationPool
    maxConcurrentRequestsPerCPU="5000"
    maxConcurrentThreadsPerCPU="0"
    requestQueueLimit="5000" />

    Basically, its set to unlimited, and the more CPU/CORES you throw at it the WORSE it is, taking more and more , never needing or hitting the que!

    What's worse is that this is now a secret setting, it used to be in the UI from what I gathered..

    I hope this helps, if im completely of the mark, please let me know too.

    https://learn.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/web/applicationpool-element-web-settings?redirectedfrom=MSDN

    other good docs
    https://www.ais.com/comparing-rpc-with-messaging-for-handling-spikes-in-load-part-2/
    https://techexpert.tips/iis/iis-limiting-concurrent-connections/
    https://serverfault.com/questions/869448/difference-between-limit-number-of-connections-setting-in-iis-and-the-max-pool-s
    https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831681(v=ws.11)?redirectedfrom=MSDN#Edit_Limits

    1 person found this answer helpful.
    0 comments No comments

  3. Sreeju Nair 12,366 Reputation points
    2021-12-27T09:52:09.447+00:00

    Based on your question, let me try to explain how IIS manage the connections. Basically the following parameters affect the connections.

    The maximum requests that can be handled by your IIS will be determined by IIS maximum number of concurrent worker threads / Maximum number of concurrent connections. If the concurrent requests are more than those values defined, then IIS need to queue the requests. The Queue length defines the number of request that will be queued by IIS and the remaining requests will be sent with 503 status code.

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.administration.applicationpool.queuelength?view=iis-dotnet
    https://learn.microsoft.com/en-us/answers/questions/585468/maximum-connection-limit-in-net-frame-work-47.html

    Hope this helps


  4. Sreeju Nair 12,366 Reputation points
    2021-12-27T12:52:24.68+00:00

    CurrentQueueSize is 0 indicates no requests are reaching the queue.

    Make sure you have installed the monitoring tools correctly.

    https://www.datadoghq.com/blog/iis-monitoring-tools/


  5. Bruce Zhang-MSFT 3,751 Reputation points
    2021-12-28T03:03:42.163+00:00

    Hi @aspx ,

    Microsoft has a performance counter to monitor IIS and asp.net application performance. You can use it to monitor request queue length by following this article.

    HTTP Service Request Queues (CurrentQueueSize): The request count in the IIS queue

    If you find this value is always 0, that means there's no request in the queue. Each request can be handled immediately on IIS.
    Though you set queue length 15 to limit it, application pool can create multiple work processes to handle requests. And each work process can create multiple threads to handle requests. Only when there's no more free threads and work processes, request will reach the queue to wait.

    160766-1.jpg


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Bruce Zhang


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.