Using StackExchange.Redis as a SignalR backplane - Issues when message to client exceeds a certain size
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
When sending messages over a certain size to a SignalR client, with AddStackExchangeRedis enabled, messages fail to send and the following debug error/exception appears. The message sends successfully if AddStackExchangeRedis is removed. This happens in production and with a simple containerised Redis instance locally.
While messages this large are not typical, it would be nice to know what determines this limit and if/where it can be configured.
### Expected Behavior
The user is made aware of the size/timeout limitation and can account for it/reconfigure.
### Steps To Reproduce
1. Configure a typical SignalR setup with a hub and client code
2. Enable a Redis backplane with `AddStackExchangeRedis`
3. Send a message to a connected client with a large payload (e.g 36MB)
### Exceptions (if any)
`Microsoft.AspNetCore.SignalR.StackExchangeRedis.RedisHubLifetimeManager: Error: Connection to Redis failed.`
`StackExchange.Redis.RedisConnectionException: SocketClosed (ReadEndOfStream, last-recv: 0) on localhost:6379/Subscription, Idle/MarkProcessed, last: SUBSCRIBE, origin: ReadFromPipe, outstanding: 0, last-read: 0s ago, last-write: 44s ago, keep-alive: 60s, state: ConnectedEstablished, mgr: 9 of 10 available, in: 0, in-pipe: 0, out-pipe: 0, last-heartbeat: 0s ago, last-mbeat: 0s ago, global: 0s ago, v: 2.0.593.37019`
### .NET Version
6.0.101
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.