Heartbeat timeout is no longer reset on packet
维护者通常 2 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- node.js, typescript
调研方向
首先跟踪 Socket.IO 服务器的 heartbeat timeout 处理,并将其与所引用的 engine.io 修复以及后续的 revert 进行比较。通过发送大量客户端数据包来复现该问题,然后验证当数据包持续到达时连接仍保持存活,而不是在 ping interval 和 timeout 之后断开连接。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
We have a high volume of data incoming from our sockets and they get disconnected at PingInterval+Timeout s with a ping timeout because the server has not received a pong, however it has received other messages from these sockets.
Note how some connections drop after ~40seconds and reconnect.
There was a fix for this in https://github.com/socketio/engine.io/commit/be7b4e7478132a9409603327b27d1aa1970dd1d9 which got reverted in https://github.com/socketio/socket.io/commit/5359bae683e2a25742bd4989d0355a8fc10d294e
While I understand the "wastefulness" of creating timers on every packet, I still think the point of the socket being very much alive if there is data coming from it is valid (even when the pong packages is coming through timely).
Is there a chance to revert the revert?
To Reproduce
Please fill the following code example:
Socket.IO server version: 4.x
Send a lot of packages from the client, watch them disconnect after ~40 seconds even when data is coming from them.
Expected behavior
Connections should not be considered stale if there are still packets coming.
- 主要语言
- TypeScript
- 星标
- 63.2k
- 派生
- 10.2k
- 平均合并
- 6 天 4 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
socketio/socket.io 的其他 Issue
-
[engine.io-client] The Node.js cookie jar lets Expires override Max-Age可能已有人在做 @Ayush701-code-zm 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
socketio/socket.io#5590 · 1 条评论 ·
维护者通常 2 天内回复
-
Raise Engine.IO minimum to 6.6.10 for published security fixes可能已有人在做 @harshit-exe-dev 于 29 天前认领。 未关闭
难度 1/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
Can't set response headers in Server.handleUpgrade可能已有人在做 @MsfPablo 于 90 天前认领。 未关闭question
难度 2/5 1-3 小时 新手友好度 72/100
socketio/socket.io#5497 · 2 条评论 ·
维护者通常 2 天内回复
-
WebTransport ignores query parameters in URL可能已有人在做 @cyphercodes 于 178 天前认领。 未关闭needs major release question
难度 2/5 1-3 小时 新手友好度 68/100
socketio/socket.io#5496 · 3 条评论 ·
维护者通常 2 天内回复
-
[engine.io-client] close() called in an upgrade listener does not close the socket可能已有人在做 @adityajai119 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 20/100
维护者通常 2 天内回复
查看 socketio/socket.io 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
outline/outline#14529 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 86/100
g1331/phantom-circuit#93 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
compiler
难度 2/5 1-3 小时 新手友好度 74/100
HerringtonDarkholme/hd-lang#1699 ·
维护者通常 1 天内回复