riverqueue / riverqueue/river

Heartbeats to decouple job runtime with RescueStuckJobsAfter?

Open
#682 7 comments 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

Hi there! I'm trying to build a production system leveraging River and I'm liking it so far.

My biggest issue has been that our jobs can take several hours to run, and we're often running into states where a job is "stuck" in a running state because of a Kubernetes job or something (even though we're attempting a graceful shutdown). I don't want to set RescueStuckJobsAfter to be too high, because that might unnecessarily slow down the system.

I don't fully understand why RescueStuckJobsAfter has to be an effective hard max on the runtime of a job. Would it be possible to expose some sort of "job heartbeat" that lets River know that a job is still alive and well, and use that to check whether a job needs to be rescued?

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

Start by reading the RescueStuckJobsAfter behavior and the job lifecycle around running and graceful shutdown states. Define how a heartbeat would indicate that a long-running job is alive, then verify that active jobs are not rescued while abandoned jobs still are.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.