riverqueue / riverqueue/river

Jobs discarded even though attempts remained ?

Open
#1,165 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.7k
Forks
179
Avg merge
15h 43m
Merged PRs (30d)
13

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names v0.31.0, Go 1.26, a service restart, and the job rescuer/cleaner log, but no source file or test. Start by reproducing the restart scenario and inspecting those logs and the affected jobs; done means identifying why max_attempts became 1 and documenting or testing the corrected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.