FG
🗄️ Databases

Stuck in 'connect' state with Cluster and Node 10.x

Freshover 7 years ago
Mar 14, 20260 views
Confidence Score87%
87%

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

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: Stuck in 'connect' state with Cluster and Node 10.x

Low Risk

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]

84

Trust Score

1 verification

100% success
  1. 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

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

redisiorediscache