Automattic / Automattic/kue

Handle Redis connection problems and errors?

Open
#1,093 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.4k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

Is it possible to handle connection problems? If Redis is down and you run;

var q = kue.createQueue({
prefix: 'q',
redis: {
port: 6379,
host: '127.0.0.1',
auth: process.env.REDIS_PASSWORD
}
});

You get:
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379

Similar if Redis is up but then it goes down during execution. I tried a Try-catch around the previous code but it does not do anything.

Is there a way to properly catch connection problems so my code can handle the error?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported failure with Redis unavailable during createQueue and during execution, using the configuration shown in the issue. Trace the createQueue entry point and existing Redis error handling to determine how connection failures are exposed. Done means the issue's requested application-level handling is defined and verified for both startup and runtime disconnects.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, redis
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.