在 iis 8 上为 websocket 设置限制并发连接 [英] Set limit concurrent connections for websocket on iis 8
问题描述
我创建了用于 websockets 的 asp.net 应用程序
我在 IIS8 上发布了我的应用程序(服务器 RAM 64GB,处理器 i7)
当我测试时,我可以打开 5000 个并发连接
然后服务器不想要其他打开的连接
当我增加工作进程的数量时,我可以打开更多的连接
I created asp.net app for work with websockets
I published my app on IIS8 (server RAM 64GB, processor i7)
When I testing I can open 5000 concurrent connections
and then server dont wanted other open connections
When I increase the number of worker processes I can open more connections
但我想知道如何增加一个进程的限制?
But I'm wondering how I can increase a limit for one process?
推荐答案
我找到了决定
对于 1 个核心的开放 50k 连接
需要设置下一个参数
I found decision
For open 50k connections for 1 core
Need set next parametrs
cd %windir%System32inetsrvappcmd.exe 设置配置/section:system.webserver/serverRuntime/appConcurrentRequestLimit:50000
cd %windir%System32inetsrv appcmd.exe set config /section:system.webserver/serverRuntime /appConcurrentRequestLimit:50000
在文件中:
%windir%Microsoft.NETFrameworkv4.0.30319aspnet.config
%windir%Microsoft.NETFramework64v4.0.30319aspnet.config
需要添加
in files:
%windir%Microsoft.NETFrameworkv4.0.30319aspnet.config
%windir%Microsoft.NETFramework64v4.0.30319aspnet.config
need add
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<system.web>
<applicationPool maxConcurrentRequestsPerCPU="50000" />
</system.web>
</configuration>
这篇关于在 iis 8 上为 websocket 设置限制并发连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!