c# – StackExchange.Redis ConnectionMultiplexer.Connect()间歇性地工作

c# – StackExchange.Redis ConnectionMultiplexer.Connect()间歇性地工作,第1张

概述我正在使用StackExchange.Redis与3个不同的Redis实例进行交谈:1在同一个子网上,2个在远端.这是我的配置代码: var configurationOptions = new ConfigurationOptions{ EndPoints = { { host, port } }, KeepAlive = 180, Pa 我正在使用StackExchange.Redis与3个不同的Redis实例进行交谈:1在同一个子网上,2个在远端.这是我的配置代码:
var configurationoptions = new Configurationoptions{    EndPoints =    {        { host,port }    },KeepAlive = 180,Password = password,DefaultVersion = new Version("2.8.5"),// Needed for cache clear    Allowadmin = true};var connectionMultiplexer = ConnectionMultiplexer.Connect(configurationoptions );

最后一行在大约70%的时间内引发连接异常:

It was not possible to connect to the redis server(s); to create a disconnected multiplexer,disable AbortOnConnectFail

为什么这是间歇性的和/或我做错了什么?当我在命令提示符下Ping了Redis服务器时,有0%的数据包丢失和< 1 ms的响应.网络稳定. 谢谢! 编辑 这是日志在失败时输出的内容:

10.48.68.28:6379,keepAlive=180,version=2.8.51 unique nodes specifIEdRequesting tIE-break from 10.48.68.28:6379 > __Booksleeve_TIEBreak...Allowing endpoints 00:00:01 to respond...10.48.68.28:6379 dID not respond10.48.68.28:6379 Failed to nominate (WaitingForActivation)No masters detected10.48.68.28:6379: Standalone v2.8.5,master; keep-alive: 00:03:00; int: Connecting; sub: ConnectedEstablished,1 active; not in use: DIDNotRespond10.48.68.28:6379: int ops=0,qu=4,qs=0,qc=0,wr=0,socks=1; sub ops=2,qu=0,subs=1,sync=2,socks=1Circular op-count snapshot; int: 0 (0.00 ops/s; spans 10s); sub: 0+2=2 (0.20 ops/s; spans 10s)Sync timeouts: 0; fire and forget: 0; last heartbeat: -1s agoStarting heartbeat...
解决方法 这似乎是一个常见的问题: https://github.com/StackExchange/StackExchange.Redis/issues/42

我刚刚下载了新版本,并没有再看到问题.然而.

总结

以上是内存溢出为你收集整理的c# – StackExchange.Redis ConnectionMultiplexer.Connect()间歇性地工作全部内容,希望文章能够帮你解决c# – StackExchange.Redis ConnectionMultiplexer.Connect()间歇性地工作所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1260430.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-08
下一篇2022-06-08

发表评论

登录后才能评论

评论列表(0条)

    保存