Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #1414
Closed
Open
Issue created Aug 04, 2019 by Administrator@rootContributor

Queue close does not close connections if it is called when is redis offline [BUG]

Created by: misos1

Description

Seems when is redis offline then bull is trying to reconnect and in this state queues cannot be closed. When is queue closing it should cancel reconnecting. Also seems if are queues created when is redis offline they will never actually connect after is redis run.

Minimal, Working Test code to reproduce the issue.

let Queue = require("bull");
let queue = new Queue("queue");
queue.process(_job => console.log("started"));
queue.on("error", err => console.log("queue error:", err));
queue.close();

When is redis running this test code gracefully ends. When is redis not running then this will emit bunch of errors and never ends even after I run redis again:

queue error: Error: connect ECONNREFUSED 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 6379
}

I also tried to run it without queue.close while was redis running, then turn off redis and call queue.close and then turn on redis again and it does not closes.

When I try to run queues, then turn off redis it will print error messages, then turn on redis again and call queue.close it will gracefully end.

Bull version

3.10.0

Additional information

Assignee
Assign to
Time tracking