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.
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using StackExchange.Redis;
var builder = new HostApplicationBuilder();
builder.Logging.AddSimpleConsole(x => x.IncludeScopes = true);
using var host = builder.Build();
var loggerFactory = host.Services.GetRequiredService<ILoggerFactory>();
var configuration = new ConfigurationOptions
{
EndPoints = { { "clustercfg.***.***.use1.cache.amazonaws.com", 6379 } },
Ssl = true,
Password = "***",
LoggerFactory = loggerFactory,
};
await using var connection = ConnectionMultiplexer.Connect(configuration);
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: