Skip to content

Few Jobs becoming orphaned #34

@diegotl

Description

@diegotl

Describe the bug

I'm using Queues with one remote Redis instance. Sometimes a few jobs to get orphaned, that means, they are stored but not listed in their queue list. Manually putting them into their corresponding list fixes, they get executed. In the logs, from the instance where jobs are dispatched, I get few errors like connection was closed unexpectedly that are always followed by command failed. I could not yet confirm this, but I suspect those failed attempts are causing orphan jobs.

To Reproduce

Not clear how to reproduce it, but one way to try would be: regularly dispatching jobs to a remote Redis instance and trying to cause some connection problems.

Expected behavior

Something to prevent or some periodic routine that fixes orphaned jobs, making sure they will be executed at some point.

Environment

  • Vapor Framework version: framework: 4.67.1
  • Vapor Toolbox version: main (6000cc5)
  • OS version: Ubuntu 20.04 (LTS) x64
  • Project compiled with Swift version 5.7.1 (swift-5.7.1-RELEASE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions