StackExchange.Redis
StackExchange.Redis copied to clipboard
Sometimes happnes RedisConnectionException: SocketClosed by accessing AWS ElasticClache
Hello. I am developing some SignalR core web app on .NET Core 3.1.1. My Application accesses AWS ElasticClache by using StackExchange.Redis (v2.0.593) through Microsoft.AspNetCore.SignalR.StackExchangeRedis (v3.1.1) and sometimes happens RedisConnectionException below (a).
I tried some actions bellow (b), but failed.
Please let me know if you have any good ideas to solve it.
(a)RedisConnectionException Message 2020-06-06 11:02:12.8330|9|ERROR|Microsoft.AspNetCore.SignalR.StackExchangeRedis.RedisHubLifetimeManager|Connection to Redis failed. StackExchange.Redis.RedisConnectionException: SocketClosed (ReadEndOfStream, last-recv: 0) on XXXXXXX.XXXXXX.XX.XXXX.apne1.cache.amazonaws.com:6379/Subscription, Idle/MarkProcessed, last: PING, origin: ReadFromPipe, outstanding: 0, last-read: 0s ago, last-write: 37s 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
(b)My actions
- updated StackExchange.Redis to 2.1.30.38891
- chnage redis paramters of connectTimeout, connectRetry, abortConnect
- change SignalR paramters of StreamBufferCapacity, MaximumReceiveMessageSize
Appreciate any help.
@mi-yamazaki did you find a workaround? did you try with 2.1.55?
@gkorland Thank you for your reply.
I did not find a workaround, but setting connectRetry to 100 will be seemd to have my issue occur a bit less fluequency, though I don't really understand why.
I did not try 2.1.55 yet, and will try it. Thank you.
@gkorland 2.1.55 cannot solve my issue, to my regret.
@mi-yamazaki have you managed to fix this? We are having the same issue.
Sorry. I have no solution clearly.
Hi @mi-yamazaki, could you please let me know if you managed to fix this issue, thanks 🙏