Next.js Discord

Discord Forum

BullMQ with Vercel/KV

Unanswered
Giant Angora posted this in #help-forum
Open in Discord
Giant AngoraOP
I am getting a connection error when trying to connect to vercel/kv. Anyone have tried getting it to work?
Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
    at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
  errno: -54,
  code: 'ECONNRESET',
  syscall: 'read'
}


just doing a sample job

import { Queue, Worker, Job } from "bullmq";
import IORedis from "ioredis";

const connection = new IORedis(process.env.KV_URL!, {
  maxRetriesPerRequest: null,
});

export const myQueue = new Queue("my-queue", { connection });

export const worker = new Worker(
  "my-queue",
  async (job: Job) => {
    console.log("Processing job", job.id, job.data);
    // Process your job here
  },
  { connection }
);

0 Replies