Stuck in 'connect' state with Cluster and Node 10.x
Problem
I'm seeing ioredis 3.2.2 intermittently getting indefinitely stuck in the 'connect' state when run with Redis.Cluster under all versions of Node 10 up to the latest (10.3.0), and not under previous major versions (e.g. 9.11.1). I'm working on a minimal repro to illustrate this, but right now it looks as though the Node 10 stream is not emitting a 'close' event to trigger `eventHandler.closeHandler(_this)` under Node 10. I'm not yet sure why this happens, but I thought I'd give a heads-up as I look at it in case anyone else is seeing the same.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Stuck in 'connect' state with Cluster and Node 10.x
This is the most minimal repro I can get. Reproduced on Node 10.1.0 and 10.3.0 with Ioredis 3.2.2 with the following script, which establishes 3 cluster connections, burns CPU for a few seconds, then tries keys at intervals. It frequently stalls out under Node 10, but always succeeds under 9.11.1. I can't repro without a cluster. [code block]
Trust Score
1 verification
- 1
This is the most minimal repro I can get. Reproduced on Node 10.1.0 and 10.3.0 w
This is the most minimal repro I can get. Reproduced on Node 10.1.0 and 10.3.0 with Ioredis 3.2.2 with the following script, which establishes 3 cluster connections, burns CPU for a few seconds, then tries keys at intervals. It frequently stalls out under Node 10, but always succeeds under 9.11.1. I can't repro without a cluster.
Validation
Resolved in redis/ioredis GitHub issue #633. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep