Skip to content

Jobs discarded even though attempts remained ? #1165

@Pascal-Delange

Description

@Pascal-Delange

I think I just encountered an issue where jobs were discarded and marked at "max_attempts=1" after a service restart.
I just upgraded to v0.31.0 (go 1.26).

I have a job type for which I know for a fact that we only ever enqueue them with the default value of max_attempts (so MaxAttempts=0 in the struct, meaning 25 attempts). I'm also fairly sure that nothing was modified manually.
All those jobs (252 succeeded, 78 discarded) where created at 2026-03-11 17:01:49.393302 +00:00 with a scheduled_at at the same time.
This happened just 2 minutes after a service restart, and about 8 second after an info log about the job rescuer / cleaner run.
I have no indication that my application code created those jobs, so I'm thinking some background job might have done something ?

I'm a bit out of ideas, but I thought I'd ask for an opinion here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions