弹来弹去跑马灯!

连接Redis 错误的解决方法: It was not possible to connect to the redis server(s); to create a disconnected multiplexer

 

The error you are getting is usually a sign that you have not set abortConnect=false in your connection string. The default value for abortConnect is true, which makes it so that StackExchange.Redis won't reconnect to the server automatically under some conditions. We strongly recommend that you set abortConnect=false in your connection string so that SE.Redis will auto-reconnect in the background if a network blip occurs.

 

Netcore :

pack: Microsoft.AspNetCore.DataProtection.StackExchangeRedis

using StackExchange.Redis;

 

1
2
3
4
5
6
public static void Main(string[] args)
{//Reids
var redis = ConnectionMultiplexer.Connect("localhost,abortConnect=false"); // or "localhost,abortConnect=false,connectTimeout=30000,responseTimeout=30000"
var s= redis.GetStatus();
CreateHostBuilder(args).Build().Run();
}

  

 

posted @   wgscd  阅读(2054)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
历史上的今天:
2019-01-18 C# winform 设置WebBowser 内核版本
2019-01-18 c# WPF 获取网络图片,验证码
点击右上角即可分享
微信分享提示