[Question] MaxRetriesPerRequest Error
Description
The maxRetriesPerRequest error only during production, everything works fine on my local setup despite using the redis connection string (Upstash: tls turned off).

I found a solution to turn the maxRetriesPerRequest setting to null but then it just hangs indefinitely.
I would really like to know what i could be doing wrong. Thank you.
Minimal, Working Test code to reproduce the issue.
import Redis from "ioredis";
import Queue from "bull";
const REDIS_URL = process.env.REDIS_URL as string;
const client = new Redis(REDIS_URL, {
lazyConnect: true,
enableReadyCheck: false,
maxRetriesPerRequest: 3,
});
const subscriber = new Redis(REDIS_URL, {
enableReadyCheck: false,
maxRetriesPerRequest: null,
});
const redisOptions = {
// redisOpts here will contain at least a property of
// connectionName which will identify the queue based on its name
createClient: function (type: string, redisOpts: any) {
switch (type) {
case "client":
return client;
case "subscriber":
return subscriber;
case "bclient":
return new Redis(REDIS_URL, {
...redisOpts,
enableReadyCheck: false,
maxRetriesPerRequest: null,
});
default:
throw new Error("Unexpected connection type: ", type);
}
},
};
const queue = new Queue("queuer",redisOptions);
async function addToQueue(data) {
const job = await queue.add(data);
return job;
}
queue.process(async (job) => {
console.log(job.data)
});
Bull version
^4.10.2
Additional information
Production environment NextJS (custom server -> node runtime): "13.0.0", (Using the src directory)
Server environment Centos 7 Cpanel