Skip to content

Expired jobs are not stopped #555

@HEYGUL

Description

@HEYGUL

We experienced issues with some long-running jobs which expirein property was set to a too short amount time.
Digging into our system we finally found out that the job was running several times concurrently which led to race conditions accessing our database.

What suprised us at first was the fact that the job was marked as expired.

After investigating pgboss source code we finally understood that an expired job is not cancel thus it is still running in the background and the retry process will start another occurence of same job.

As we have no event sent when marking a job as expired we cannot gracefully stop it on our own.

What would you advice us to do in such a case ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions