Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 09:16
    pallavsharma commented #1146
  • May 25 23:11
    headlessme opened #1589
  • May 25 22:04
    pvogel1967 commented #1584
  • May 25 13:21
    marcbachmann commented #1451
  • May 25 13:17
    marcbachmann commented #1451
  • May 25 13:12
    Mall0c commented #1451
  • May 25 12:31
    arthosofteq opened #1588
  • May 25 11:07
    Bjoernstjerne commented #1587
  • May 25 03:58
    zry754331875 commented #1390
  • May 24 13:56
    SathishKumarRamasamy commented #1587
  • May 24 12:57
    Bjoernstjerne commented #1587
  • May 24 05:23
    SathishKumarRamasamy opened #1587
  • May 23 11:58
    Var-S1 commented #1431
  • May 23 10:19
    marcbachmann commented #1431
  • May 22 17:43
    ligreman commented #1583
  • May 22 17:42
    ligreman commented #1583
  • May 22 17:41
    ligreman commented #1583
  • May 22 07:50
    cnwangjie closed #1586
  • May 22 07:50
    cnwangjie commented #1586
  • May 22 04:38
    wenq1 commented #1081
Jakub Kisielewski

Anyone using ioredis with elasticache cluster mode?
I'm trying a failover scenario and my node process crashes (unhandled rejection) with:

Error: Connection is closed.
     at close (node_modules/.pnpm/registry.npmjs.org/ioredis/4.17.1/node_modules/ioredis/built/redis/event_handler.js:179:25)
    at Socket.<anonymous> (node_modules/.pnpm/registry.npmjs.org/ioredis/4.17.1/node_modules/ioredis/built/redis/event_handler.js:150:20)
    at Object.onceWrapper (events.js:418:26)
    at Socket.emit (events.js:311:20)
    at Socket.EventEmitter.emit (domain.js:482:12)
    at TCP.<anonymous> (net.js:668:12)

I'd happily post a debug log but I've exceeded elasticache failover api quota :/

hello, there is someway to get redis version ?
i mean programmatically using ioredis
Christian Roy
thanks !
@roychri I'm a little bit confused how to use that, could you give me a example how to do that or where to find some documentation ? I can see nothing on readme
thanks i got it
sushmeet sunger
Hi all, looking for some clarification about the redis.scanStream method. I have a big redis cluster and at any given time I would like to iterate over the keys returned and perhaps return 5 or 10 in total
I thought of just existing the stream but not sure if that helps me but in the background it will still continue to keep streaming until it reaches the end. I am quite sure it will so wondering how if at all I can handle this use case thanks
anyone active?
Sourav Ray

I am facing issue in connecting to a single Elasticsearch instance. My code looks like bellow -

this.instance = new Redis({
      host: REDIS_HOST,
      port: REDIS_PORT,
      tls: {},
      connectTimeout: 10000,
      maxRetriesPerRequest: 4,
      retryStrategy: (times) => Math.min(times * 30, 1000),
      reconnectOnError: (error) => {
        const targetErrors = [/READONLY/, /ETIMEDOUT/];
        targetErrors.forEach((targetError) => {
          if (targetError.test(error.message)) {
            return true;
   RedisConnection.instance = this.instance;

I am getting following errors -

    errno: 'ECONNREFUSED',
    code: 'ECONNREFUSED',
   syscall: 'connect',
   address: '',
   port: 6379

I have verified that host: REDIS_HOST has correct resource address and it is not passing or localhost.

Sourav Ray
Got the issue resolved. I think the community is not much active here.
Trung Tin Luong
hi guys !
import Redis from 'ioredis';
readonly redis = new Redis(+DB_REDISPORT, DB_REDISHOST, { password: DB_REDISPASS });
Im using, but have error: [ioredis] Unhandled error event: ReplyError: NOAUTH Authentication required.
plese help me for guide wrong
Advaith Doosa
Hey all, was wondering if anyone has encountered issues with .scanStream({match: "*pattern"})
1 reply
I keep getting empty arrays while watching the stream for data
Jonathan Yen
hi, would anyone know what's going on with this:
@400000005f6a655f02387564 [ioredis] Unhandled error event: ClusterAllFailedError: Failed to refresh slots cache.
@400000005f6a655f02387d34     at tryNode (/var/www/api4/node_modules/ioredis/built/cluster/index.js:359:31)
@400000005f6a655f0238811c     at /var/www/api4/node_modules/ioredis/built/cluster/index.js:376:21
@400000005f6a655f02388504     at Timeout.duplicatedConnection.cluster.utils_2.timeout (/var/www/api4/node_modules/ioredis/built/cluster/index.js:624:24)
@400000005f6a655f023888ec     at Timeout.run (/var/www/api4/node_modules/ioredis/built/utils/index.js:156:22)
@400000005f6a655f0238dedc     at listOnTimeout (timers.js:326:17)
@400000005f6a655f0238e2c4     at processTimers (timers.js:268:5)
#1248 Does anyone meet this issue?
We got the error of All keys in the pipeline should belong to the same slots allocation group when enableAutoPipelining set true
Shashi Saini
Hi I use ioredis scanstream functionality in my AWS lambda. It seems my lambda never terminates successfully whenever it connects to Redis. I see timed out messages in AWS cloudwatch logs for the lambda. My lambda function is a kinesis consumer so just keeps getting same payload again and again since the lambda doesn't compeletes successfully. Does anybody saw similar issue? Is there a way to gracefully terminate redis connections from lambdas?
Hi guys. I am new to elastic cache and have some issues connecting to elastic cache cluster
Getting this issue:Unhandled error event: ClusterAllFailedError: Failed to refresh slots cache. My setup looks like new Cache([{ host: clustercfg.xxxx.xxxx.xxxx.cache.amazonaws.com}], { redisOptions: { password: bananas, tls: {}} ) What am I doint wrong
Can you delete a key via ioredis?
Jonathan Hrang
I'm getting this error, when I try to connect locally so can anybody help with Zoom pls?. I'll pay you. thanks
Jonathan Hrang
if someone saw this and think can help me pls let me know at jsianguk@gmail.com thanks
@luin Hi, I added RedisWritable and RedisReadable to ioredis. luin/ioredis#1376
@spiderunderurbed:matrix.org yes, by doing a redis.del or better redis.unlink
Richard Castera
Hello, where is there documentation for using ioredis with TLS and Sentinel?
Kasun Vithanage
Hi, why i get ETIMEDOUT when TLS option enabled? im using heroku
Hi, I am trying to connect redis cluster using a node.js application .. however, i am getting this error "ioredis unhandled error event clusterallfailederror failed to refresh slots cache".. Can anyone help here?
Connection to the single node is working fine
anyone know how to implement a similar detect_buffers property that exists in node_redis library for ioredis?
nvm there is getBuffer API calls
and associated buffer calls
anyone know how to deal with ioredis sockets staying open in tests? I've tried redis.quit() and redis.disconnect() and the socket still stays open
^ i had a hanging socket i didn't close!
Jack C
when i use hmset, nested objects return as '[object Object]', is there any way to fix this?
Hyunji Song
Anyone know why I'm getting this error for my redis cluster Too many Cluster redirections. Last error: ReplyError: MOVED 12182 :0 with 3 nodes
Edgaras Masilionis
Hey guys, I started up 6 redis cluster nodes (3 masters and 3 replicas) and now I'm trying to connect to them but I keep getting ClusterAllFailedError: Failed to refresh slots cache, and it just does not stop, I also tried "workarounds" found by googling (like adding high values for slotsRefreshTImeout and slotsRefreshInterval) but then my cluster is not working, any ideas?
Brandon Max
Hi Friends!
Glad this chat is somewhat alive. I have a command timeout set for a .get. I'm curious how to make that command timeout execute the retryStrategy?
Brandon Max
we're gonna give auto pipelining a good. Godspeed.
Jack Twilley
I am using a transparent key prefix but would like to get some specific keys outside that prefix. Are there alternatives to using KEYS or SCAN in this case?
Jack Twilley
It is a shame that one cannot override transparent key prefixes within specific commands.