Coder Social home page Coder Social logo

Comments (6)

2881099 avatar 2881099 commented on July 17, 2024

运行测试代码,反复打开和关闭 redis-server,结果符合预期。

new Thread(() => {
	while (true) {
		Task.Run(async () => {

			string aaa = "undefined";
			try {
				aaa = await RedisHelper.CacheShellAsync("key", "1", 1000,
					async () => await Task.FromResult("Cache" + DateTime.Now.ToLongTimeString())); ;
			} catch (Exception ex) {
				Console.WriteLine(ex.Message + "\r\n" + ex.StackTrace);
			}
			Console.WriteLine(aaa);
		}).Wait();

		Thread.CurrentThread.Join(2000);
	}

}).Start();

from csredis.

2881099 avatar 2881099 commented on July 17, 2024

CosmoKey 说:

再次测试了一下,测试场景“开启redis,client运行后,仅重启一次redis”,发现两轮结果不太一致,尤其是第二轮,结果不太理想。

请问又没地方可以更改ping间隔?,加快恢复服务速度?

from csredis.

2881099 avatar 2881099 commented on July 17, 2024

@ CosmoKey
大概要描述的问题是,redis-server恢复服务了,连接池已断开的连接仍然会报错,是吧?

from csredis.

2881099 avatar 2881099 commented on July 17, 2024

CosmoKey 说:

两次测试都是直接重启Redis所在Docker,模拟灰度升级、docker闪断等场景。

第一次测试时,发现同步或异步,都会进程都会卡,并且超过1秒才返回。

第二次测试时,发现重启后有时可用,有时又不可用。

from csredis.

2881099 avatar 2881099 commented on July 17, 2024

发布了 v2.6.9 ,试试。

redis-server 服务器不通了,会卡是正常现象啊。socket是这样的。

访问量巨大的时候断线,感觉非常失控。
题外建议:如果考虑灰度切换,用 nginx 转发是否可行,所有 csredis 连 nginx。

from csredis.

2881099 avatar 2881099 commented on July 17, 2024

CosmoKey 说:

已测试,上午问题已解决,感谢楼主如此神速。

以上来自 cnblogs 对话内容

from csredis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.