pasha
pasha

Reputation: 566

How to allow for more than 5000 concurrent WebSocket connections in IIS 8 to a single Worker Process?

I've created an asp.net app for work with WebSockets. I published my app on IIS 8 (server specs: 64GB RAM, i7 processor). I could open up to 5000 concurrent connections during testing. The server wouldn't open new connections after this limit has been reached.

I can open more connections if I increase the number of Worker Processes, but I'm wondering if I can do so with a single Worker Process.

Upvotes: 3

Views: 7457

Answers (1)

pasha
pasha

Reputation: 566

I've successfully raised the per Worker Process limit to 50,000 by applying the following changes:

  • open cmd as Administrator and run:
%windir%\System32\inetsrv\appcmd.exe set config /section:system.webserver/serverRuntime /appConcurrentRequestLimit:50000
  • add the following block:

    <configuration>
      <system.web>
        <applicationPool maxConcurrentRequestsPerCPU="50000" />
      </system.web>
    </configuration>
    

    to these files:

    • %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet.config
    • %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet.config

Upvotes: 8

Related Questions