ASP.NET Counters

Applies To: Windows Server 2003, Windows Server 2003 with SP1

Use the following counters to monitor queuing for all ASP.NET applications on your server.

Request Execution Time

The value of this counter is the number of milliseconds taken to execute the latest request. In the Microsoft .NET Framework version 1.0, request execution time begins when the worker process receives the request and stops when the ASP.NET ISAPI sends HSE_REQ_DONE_WITH_SESSION to IIS. This counter includes the time taken to write the response to the client for IIS 5.0, but not for IIS 6.0. Consequently, for IIS 5.0, a client with a slow network connection increases the value of this counter considerably.

In .NET Framework version 1.1, request execution time begins when the HttpContext for the request is created and stops before the response is sent to IIS. Assuming that user code does not call HttpResponse.Flush, this means that request execution time stops before any bytes are sent to IIS or to the client.

There is no threshold for this counter. The value of this counter should be stable. Experience will help you set a threshold for a particular site.

Requests Queued

The value of this counter is the number of requests currently in the queue. It includes requests in all ASP.NET queues. The Aspnet_wp process queue is a named pipe through which the request is sent from one process to the other. The number of requests in this queue increases if there is a shortage of available I/O threads in the Aspnet_wp process. When the limit specified by <processModel requestQueueLimit=/> is exceeded, requests will be rejected with a 503 error (Service Unavailable). Note that if a request is rejected for this reason, it will never reach managed code, and error handlers will not be notified. Normally this only occurs when the server is under a very heavy load.

Virtual directory queues maintain the availability of worker and I/O threads. The number of requests in these queues increases if the number of available worker threads or available I/O threads falls below the limit specified by <httpRuntime minFreeThreads=/>. When the limit specified by <httpRuntime appRequestQueueLimit=/> is exceeded, the request is rejected with a 503 error and the client is sent an HttpException with the message Service Unavailable.

Requests Rejected

The value of this counter is the number of rejected requests. Requests are rejected when one of the queue limits is exceeded. Back-end latency, such as that caused by a slow computer running SQL Server, is often preceded by a sudden increase in the number of pipeline instances and a decrease in % Processor Time and Requests/second. A server might be overwhelmed during times of heavy load due to processor or memory constraints that ultimately result in the rejection of requests.

The value of this counter should be 0. Values greater than 0 should be investigated.

Request Wait Time

The value of this counter is the number of milliseconds that the most recent request spent waiting in the global queue. This does not include any time the request spent waiting in the application queues.

The threshold for this counter is 1,000. The average request should spend 0 milliseconds waiting in the queue.