ASP.NET Request Queues

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

ASP.NET uses two request queues:

  • The global queue, which is managed by the process that runs ASP.NET (Aspnet_wp). The global queue is configured in the Machine.config file by the <processModel requestQueueLimit> property.

  • The application queue, or virtual directory queue, which is managed by the HttpRuntime class. The HttpRuntime class provides run-time services for ASP.NET applications. There is one queue for each virtual directory. The application queue is configured in Machine.config by the <httpRuntime appRequestQueueLimit> property.

When either queue exceeds its default limit, the request is rejected with a 503 error (Service Unavailable).

Worker processes that handle ASP.NET requests might run more threads than needed for ASP requests. Also, ASP.NET might queue requests more readily than ASP queues requests, but this should not be regarded as a scalability or performance issue. ASP.NET requests are executed more quickly than ASP requests. This means that with ASP.NET it is actually better to have fewer concurrent requests and more serial requests. Because ASP.NET maximizes the overall work on the CPU, this leads to fewer context switches.

Overall, ASP.NET is very self-tuning. For the global queue (Aspnet_wp process), the default ASP.NET thread numbers on four-processor and eight-processor servers should not require additional tuning. For servers with more than eight processors, you might want to decrease the default thread numbers by modifying the values of the <processModel maxworkerthreads> and <processModel maxiothreads> properties in Machine.config.