I get Error: read ECONNRESET at TCP.onStreamRead after some running time

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

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, mysql, nodejs
领域
databases

调研方向

首先,在 Linux x64 上使用 Node 18.20.4,在报告的空闲时间段之后,使用 loopback-connector-mysql 7.0.13 复现 loopback4 应用对 GET /settings 的请求。比较 connector 在 ECONNRESET 和重试方面的行为;完成标准是经过较长时间运行后,endpoint 仍能返回数据库数据,且不会返回 500 响应。

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

描述

bug

Steps to reproduce

  • Run loopback4 app using "loopback-connector-mysql": "7.0.13"
  • All endpoints work fine
  • After some time (e.g 2 hours), try to get data from an endpoint
  • I receive error 500
    Request GET /settings failed with status code 500. Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
  • After 3 or 4 retry, then I get a good response from the server.

Current Behavior

  • I get error 500 after some running time (e.g 2 hours) with my loopback4 app
  • But I have a loopback3 (node 14) application connected to that same database that is using loopback-connector-mysql": "^5.4.3" and I do not have such error even after 24h on running

Expected Behavior

  • I should get the response from the database without error

Link to reproduction sandbox

N/A

Additional information

node -e 'console.log(process.platform, process.arch, process.versions.node)'
linux x64 18.20.4

npm ls --prod --depth 0 | grep loopback
+-- @loopback/[email protected]
+-- @loopback/[email protected]
+-- @loopback/[email protected]
+-- @loopback/[email protected]
+-- @loopback/[email protected]
+-- @loopback/[email protected]
+-- @loopback/[email protected]
+-- @loopback/[email protected]
+-- @loopback/[email protected]
+-- [email protected]

Related Issues

See Reporting Issues for more tips on writing good issues

主要语言
JavaScript
星标
126
派生
181
平均合并
3 天 22 小时
30 天内合并 PR
11

环境准备

从这里开始

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

loopbackio/loopback-connector-mysql 的其他 Issue

查看 loopbackio/loopback-connector-mysql 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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