Giter Club home page Giter Club logo

Comments (14)

2881099 avatar 2881099 commented on July 18, 2024

该错误代表连接超时

from csredis.

Justinacy avatar Justinacy commented on July 18, 2024

该错误代表连接超时

但是我并没有做什么,ping这个redis服务成功后就执行这个命令,然后就报超时,我应该做什么呢?重新new这个客户端

from csredis.

Justinacy avatar Justinacy commented on July 18, 2024

该错误代表连接超时

但是我并没有做什么,ping这个redis服务成功后就执行这个命令,然后就报超时,我应该做什么呢?重新new这个客户端

重新new 后还是会报错的

from csredis.

2881099 avatar 2881099 commented on July 18, 2024

ping 只是服务器能通,不一定是端口能通

如果 redis-server 没有改端口,默认是 6379

测试方法:

telnet 127.0.0.1 6379

from csredis.

Justinacy avatar Justinacy commented on July 18, 2024

ping 只是服务器能通,不一定是端口能通

如果 redis-server 没有改端口,默认是 6379

测试方法:

telnet 127.0.0.1 6379

确认reids-server服务已经可用,但是之后操作xreadgroup 方法还是一直报Unable to read data from the transport connection: Connection timed out 像是连接池中连接超时了,可是我执行IsAvailable返回true了 ,有什么方法可以重置连接池连接吗?或者说我怎么样做才能让连接恢复正常,因为我要在代码中检测redis服务就绪,就绪后执行某些操作redis方法,有什么好的方式实现吗?

from csredis.

Justinacy avatar Justinacy commented on July 18, 2024

务器能通,不一定是端

我跑的 csredis 的ping方法

from csredis.

2881099 avatar 2881099 commented on July 18, 2024

xreadgroup 是阻塞的,是不是设置太长的超时时间了。

这个时间不能设置大于 Socket.ReceiveTimeout 的值,大约15秒

否则就触发了 socket receive timeout 错误。

from csredis.

2881099 avatar 2881099 commented on July 18, 2024

如果想等待100秒,建议加个循环处理:

for (var i = 0; i < 10; i++)
xreadgroup 10秒

from csredis.

Justinacy avatar Justinacy commented on July 18, 2024

如果想等待100秒,建议加个循环处理:

for (var i = 0; i < 10; i++) xreadgroup 10秒

我现在把xreadgroup 阻塞时间改为1秒,在while循环中执行,还是报错csreids
错误【redis-server:6379/15】:Unable to read data from the transport connection: Connection timed out. at CSRedis.CSRedisClient.GetAndExecute[T](RedisClientPool pool, Func2 handler, Int32 jump, Int32 errtimes) at CSRedis.CSRedisClient.NodesNotSupport[T](String[] keys, T defaultValue, Func3 callback)
at CSRedis.CSRedisClient.XReadGroup(String group, String consumer, Int64 count, Int64 block, ValueTuple`2[] streams)
at UIH.Mcsf.MQ.Transfer.MQ.RedisMQ.<>c__DisplayClass0_1.b__1()

from csredis.

Justinacy avatar Justinacy commented on July 18, 2024

请问在初始化redis连接时,redis-server没有就绪,过大概一分钟后就绪,三方库内部知道redis恢复了,为什么连接池里的连接都超时了,连接池默认连接数50个,这50个都不可用了,感觉这个问题的本质还是连接池里的连接在redis-server就绪后为什么都不可用了

from csredis.

2881099 avatar 2881099 commented on July 18, 2024

哪个版本,不可用后需要等待恢复,每5秒检测一次

from csredis.

Justinacy avatar Justinacy commented on July 18, 2024

3.8.669 这个版本 不可用后需要等待恢复,每5秒检测一次这个指的是redis-server 还是连接池里的连接

from csredis.

2881099 avatar 2881099 commented on July 18, 2024

链接池里面,建议早切换到FreeRedis

from csredis.

2881099 avatar 2881099 commented on July 18, 2024

FreeRedis对redis5.0以上版本支持更完善

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.