我使用 Microsoft.AspNetCore.SignalR.Client 对在 Windows Server 2016 标准上托管的 SignalR (ASP.NET Core) 应用程序进行负载测试。安装了 Dotnet 核心托管 2.1.1
我无法创建超过 3000 (2950-3050) 个连接。
已经尝试过此处描述的建议:
添加了限制UseKestrel(如果我将值设置为 100 或 1000,这似乎有效):
var host = new WebHostBuilder()
.UseKestrel(options =>
{
options.Limits.MaxConcurrentConnections = 50000;
options.Limits.MaxConcurrentUpgradedConnections = 50000;
})
Run Code Online (Sandbox Code Playgroud)
通过添加以下内容更改了所有 aspnet.config 文件:
<system.web>
<applicationPool maxConcurrentRequestsPerCPU="50000" />
</system.web>
Run Code Online (Sandbox Code Playgroud)
执行了这个命令:
cd %windir%\System32\inetsrv\ appcmd.exe 设置配置 /section:system.webserver/serverRuntime /appConcurrentRequestLimit:50000
添加了Web Service\Current Connections - Maximum Connections的性能计数器。并且最大连接数增加到 3300 并停止。
服务器日志没有异常。但我感觉系统有一些限制。
服务器 IIS 日志仅包含以下内容:
获取 …
我使用websockets创建了asp.net应用程序
我在IIS8上发布了我的应用程序(服务器RAM 64GB,处理器i7)
当我测试时我可以打开5000个并发连接
然后服务器不想要其他打开的连接
当我增加工作进程的数量时可以打开更多的连接
但我想知道如何增加一个进程的限制?