dotnet / dotnet/aspnetcore

SignalR client cannot connect to SignalR server

Open
#59,639 4 comments 0 reactions 0 assignees View on GitHub
area-signalr
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

OS:Ubuntu 22.04
SignalR Server: .net8.0
SignalR.Client 7.0.10
I use SignalR server to push messages to SignalR, but when there are many SignalR clients, it is easy for the SignalR client to be unable to connect to the SignalR server. This situation is easy to occur when the number of client connections exceeds 2000. I suspect it is related to the excessive number of client connections. I wonder if there is any recommended configuration for this?

Due to special circumstances, distribution is not supported for the time being, and only one SignalR server can be used, so I hope it can support more client connections

```
.AddSignalR(options =>
{
options.EnableDetailedErrors = true;
options.MaximumReceiveMessageSize = 1024 * 1024 * 10;
})

app.MapHub("/relationhub", options =>
{
// 1024 * 1024 * 10 = 10MB
options.ApplicationMaxBufferSize = 1024 * 1024 * 10;
options.TransportMaxBufferSize = 1024 * 1024 * 10;
});
```

The server's CPU and memory are both below 20%, and the bandwidth performance is good.

```
ulimit -n
65535
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.