15

And where would I find a setting to change it?

Brandon Linton
  • 263
  • 1
  • 2
  • 6

1 Answers1

15

there is no max as it depends on your application settings, hardware, and .net framework version. By default under framework 3.51 and up the number of concurrent requests per CPU (logical) is 5000. (if not defined under 2.0 it's 12 but the reccomendation is to set it to 5000 like 3.5 and 4.0)

This is defined in aspnet.config:

<system.web>
        <applicationPool maxConcurrentRequestsPerCPU="12" maxConcurrentThreadsPerCPU="0" requestQueueLimit="5000"/>
</system.web>

This is the default and by no means the limit. The largest I have ever seen it set to is 999999 (i suspect they were afraid to set it any higher just in case). The best way to determine the right size for you is through stress testing the application.

Jim B
  • 24,081
  • 4
  • 36
  • 60
  • +1 thanks for the setting. So does that mean on .NET 3.5+ that, by default, 5000 requests can execute simultaneously, or that 5000 requests can be queued before requests start getting rejected? – Brandon Linton May 18 '11 at 18:54
  • 4
    NO 5000 requests can execute, requestQueueLimit sets the request queue length (also defaulting to 5000, but can go up to 4,294,967,295). so at 10001 simultaneous requests you will get a 503 error by default (5000 executing plus 5000 queued) PER LOGICAL CORE so that any machine made recently (do they make singl core cpus anymore?) should have at least 4 logical cores (2 + 2 hyperthread cpus) so on that machine 20,000 execute and 20,000 queue up by default – Jim B May 18 '11 at 19:11
  • 1
    According to Microsoft's documentation on these settings, the defaults only allow 12 requests to run simultaneously and 5000 to be in the queue. If that is correct, then it will not be running 5000 requests simultaneously. Here is the link in case you want to review: http://msdn.microsoft.com/en-us/library/ee377050(v=bts.10).aspx – Brain2000 Feb 01 '13 at 17:44
  • 1
    So you are almost correct. The number that is set in a vanilla IIS install is 12 per CPU- so in a dual core machine there would be 24 requests. HOWEVER (and this is a giant however) the default setting (autoConfig=true) completely ignores this as it is used to constrain the size of the app pool not limit the number of requests, and the msdn entry you refer to explains this. – Jim B Feb 05 '13 at 21:50
  • 1
    The link above points to an archived entity, here's the working one https://docs.microsoft.com/en-us/biztalk/technical-guides/optimizing-iis-performance – Anirudh Goel Jul 31 '18 at 14:17