Skip to content
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

StackExchange.Redis.RedisConnectionException: SocketClosed Redis connection error SocketClosed #452

Open
ismkdc opened this issue Feb 3, 2022 · 1 comment

Comments

@ismkdc
Copy link
Contributor

ismkdc commented Feb 3, 2022

I am using package on my little cluster (1 master - 3 slave -> bitnami image https://hub.docker.com/r/bitnami/redis) also i have 4 app instance on my little cluster, I am using this config for each app instance


        var conf = new RedisConfiguration
        {
            AbortOnConnectFail = false,
            Password = Configuration.GetValue<string>("RedisConf:Password"),
            Hosts = Configuration.GetSection("RedisConf:Hosts").Get<RedisHost[]>(),
            AllowAdmin = true,
            ConnectTimeout = 10000,
            Database = 0,
            PoolSize = 20,
            ServerEnumerationStrategy = new ServerEnumerationStrategy
            {
                Mode = ServerEnumerationStrategy.ModeOptions.All,
                TargetRole = ServerEnumerationStrategy.TargetRoleOptions.Any,
                UnreachableServerAction = ServerEnumerationStrategy.UnreachableServerActionOptions.Throw
            }
        };

        services.AddStackExchangeRedisExtensions<SystemTextJsonSerializer>(conf);

But sometimes exceptions throws this;

web_4 | {"EventId":0,"LogLevel":"Error","Category":"StackExchange.Redis.Extensions.Core.Implementations.RedisConnectionPoolManager","Message":"Redis connection error SocketClosed","Exception":"StackExchange.Redis.RedisConnectionException: SocketClosed (ReadEndOfStream, last-recv: 0) on redis-master:6379/Subscription, Idle/MarkProcessed, last: PING, origin: ReadFromPipe, outstanding: 0, last-read: 0s ago, last-write: 14s ago, keep-alive: 60s, state: ConnectedEstablished, mgr: 0 of 24 available, in: 0, in-pipe: 0, out-pipe: 0, last-heartbeat: 0s ago, last-mbeat: 0s ago, global: 0s ago, v: 2.2.88.56325","State":{"Message":"Redis connection error SocketClosed","FailureType":"SocketClosed","{OriginalFormat}":"Redis connection error {FailureType}"}}

  • OS: Docker on Debian
  • Runtime version .NET 6
  • Version 8.0.3
@GlodenBoy
Copy link

same situation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants