-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RedisConnectionException: SocketClosed after Dispose of ConnectionMultiplexer #2652
Comments
I'm experiencing this with Azure Cache for Redis:
I would like to keep spurious errors out of our logs; I don't want a "fail" to be logged if a graceful shutdown could happen instead. |
It looks like SE.Redis tries to suppress error logging here: StackExchange.Redis/src/StackExchange.Redis/PhysicalConnection.cs Lines 442 to 443 in 0071148
However, that only works if StackExchange.Redis/src/StackExchange.Redis/PhysicalConnection.cs Lines 1608 to 1615 in 0071148
Which won't be true if we're using SSL: StackExchange.Redis/src/StackExchange.Redis/PhysicalConnection.cs Lines 1556 to 1566 in 0071148
This may be why @teemka reported that it only happens with AWS (and I'm encountering it with Azure): it's more typical to use SSL with PaaS Redis? |
Hi,
I've recently enabled logging in an application and during shutdown we are getting a lot of error logs
RedisConnectionException: SocketClosed
. They appear after ConnectionMultiplexer has been disposed (last command is QUIT). I have reproduced the issue in a simple console Program. I've tested it against other instances of Redis and it seems that it only happens with AWS. Those errors don't propagate to the user code but it's annoying that they appear.Client information: Windows 10, nuget v2.7.20, .NET 8.0.2
Server information: Amazon ElastiCache Redis instance v7.0.7, clustering enabled, 3 shard, 6 nodes
Minimum code to reproduce:
Logs from the execution:
The text was updated successfully, but these errors were encountered: