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
  • #957
Closed
Open
Issue created May 23, 2018 by Administrator@rootContributor

Connection leak when using TLS

Created by: plarsson

Description

When using TLS option the Redis client active connection just grows infinitely.

To reproduce; just open a bull queue and close it, the client connection is still active in redis.

After a lot of investigation of stunnel, ioredis, tls and various things I figured out the problem was actually in bull in the method whenCurrentJobsFinished() https://github.com/OptimalBits/bull/blob/master/lib/queue.js#L1172 where it tries to reconnect.

It's only happening for TLS which is weird. Why is this re-connect feature running on close?

If I remove this line everything works fine and I later noticed an undocumented flag on the close() - doNotWaitActive which also fixes my problem (then this function is not runned). So I guess I can go with that flag as a workaround for now.

Thanks for a nice project!

Minimal, Working Test code to reproduce the issue.

Open a bull queue with tls and close it.

Bull version

3.4.2

Additional information

Assignee
Assign to
Time tracking