Upstash redis not connecting with ioredis

Error:

2024-01-12T21:04:51.908 app[e784961bed1138] ams [info] Error: getaddrinfo ENOTFOUND fly-solitary-butterfly-343.upstash.io

2024-01-12T21:04:51.908 app[e784961bed1138] ams [info] at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {

Connection:

import Redis from "ioredis";

export const redisClient = new Redis(env.REDIS_URL, {
  maxRetriesPerRequest: null,
  enableReadyCheck: false,
});

Where the REDIS_URL is the one from Upstash Redis

update:

solved by adding family: 6 to the redis config

export const redisClient = new Redis(env.REDIS_URL, {
  maxRetriesPerRequest: null,
  enableReadyCheck: false,
  family: 6
});

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.