"total_retry_time" not include connection timeout

未关闭
#1,444 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
nodejs, redis, typescript

调研方向

使用无法访问的 IP 以及报告中描述的 options 对象,通过 redis.createClient 重现该问题。跟踪连接超时、重试事件和 total_retry_time 的测量方式。完成标准是连接时间被计入,并且重试事件在配置的连接超时时间内发生。

由索引模型根据 Issue 内容生成。

描述

  • Version: 2.8.0
  • Platform: node v8.11.2 on ubuntu
  • Description: Connection to an IP which can't be reached, emit a retry event after a very very long time during every retrying... What I meas the total_retry_time not include connecting time, and retry event will be emited after another connection timeout, if the connection timeout not setted, default is quite a long time.
// connect to an IP not exists
redis.createClient(6379, '999.999.999.999', options);

I solved this with a connect_timeout param which is abandoned by official...this will solve the first time connecting timeout problems...(max connection timeout set to 2S before emiting retry event )

image

主要语言
TypeScript
星标
17.6k
派生
2k
平均合并
1 天 22 小时
30 天内合并 PR
62

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

redis/node-redis 的其他 Issue

查看 redis/node-redis 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。