How to Configure and Optimize IIS 7.5 Concurrent Request Limits on Windows Server 2008 R2


3 views

In IIS 7.5 running on Windows Server 2008 R2, the default maximum concurrent requests setting is controlled by the maxConcurrentRequestsPerCPU parameter in the applicationHost.config file. The default value is 5000 concurrent requests per CPU core.


<system.webServer>
    <aspnet>
        <processModel maxConcurrentRequestsPerCPU="5000" />
    </aspnet>
</system.webServer>

To modify this setting:

  1. Open %windir%\system32\inetsrv\config\applicationHost.config as Administrator
  2. Find the <processModel> element under <system.webServer>/<aspnet>
  3. Modify the maxConcurrentRequestsPerCPU attribute

When adjusting this value, consider:

  • Available system resources (CPU, memory)
  • Average request processing time
  • Application architecture (static vs dynamic content)

Use this PowerShell script to monitor current request counts:


Import-Module WebAdministration
while($true) {
    $requests = Get-ChildItem IIS:\AppPools | ForEach-Object {
        $poolName = $_.Name
        $count = (Get-Counter "\Web Service(_Total)\Current Connections").CounterSamples.CookedValue
        [PSCustomObject]@{
            Pool = $poolName
            CurrentRequests = $count
        }
    }
    $requests | Format-Table -AutoSize
    Start-Sleep -Seconds 5
}

For high-traffic scenarios, consider these additional settings:


<system.applicationHost>
    <applicationPools>
        <add name="MyAppPool" 
             queueLength="1000" 
             cpuLimit="50000" 
             cpuAction="KillW3wp">
            <recycling logEventOnRecycle="Time, Memory">
                <periodicRestart time="00:00:00"/>
            </recycling>
        </add>
    </applicationPools>
</system.applicationHost>

In IIS 7.5 (Windows Server 2008 R2), the default maximum concurrent requests is determined by the thread pool settings in the applicationHost.config file. Unlike later IIS versions, IIS 7.5 handles requests through Windows Process Activation Service (WAS) worker processes with these key parameters:

<system.applicationHost>
    <applicationPools>
        <add name="DefaultAppPool">
            <cpu smpAffinitized="false" />
            <processModel maxProcesses="1" />
        </add>
    </applicationPools>
</system.applicationHost>

The default concurrent request capacity depends on these factors:

  • For .NET applications: Limited by ASP.NET thread pool (maxWorkerThreads defaults to 20 per CPU core)
  • For static content/native modules: Limited by HTTP.sys queue (default 1000 requests)
  • Global limit of 12 concurrent requests per CPU core for managed code

The primary configuration file is located at:

%windir%\system32\inetsrv\config\applicationHost.config

To increase concurrent request capacity, modify these sections:

<configuration>
    <system.web>
        <processModel autoConfig="false" 
            maxWorkerThreads="100" 
            maxIoThreads="100" 
            minWorkerThreads="50" 
            minIoThreads="50" />
    </system.web>

    <system.net>
        <connectionManagement>
            <add address="*" maxconnection="100" />
        </connectionManagement>
    </system.net>
</configuration>

For .NET applications, you can programmatically adjust thread pool settings during startup:

using System.Threading;

public class Global : HttpApplication
{
    protected void Application_Start(object sender, EventArgs e)
    {
        int minWorker, minIOC;
        ThreadPool.GetMinThreads(out minWorker, out minIOC);
        ThreadPool.SetMinThreads(100, minIOC);
        
        int maxWorker, maxIOC;
        ThreadPool.GetMaxThreads(out maxWorker, out maxIOC);
        ThreadPool.SetMaxThreads(200, maxIOC);
    }
}

Essential performance counters to track request throughput:

  • Web Service: Current Connections
  • ASP.NET: Requests Queued
  • ASP.NET Applications: Requests/Sec
  • System: Context Switches/sec