River job stuck at running
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by examining River v0.31.0's global timeout and rescue behavior, then reproduce or investigate the provided query showing old jobs still in the running state. Done means the cause of the stale records across queues is identified and a verified resolution or regression coverage is provided.
索引モデルが issue の本文から書いたものです。
説明
We recently noticed that a lot of our river job(around 5000) is stuck at a state of running. We have a global timeout of 1 hour and thought that the rescue is suppose to resolve this? These are across different job queues.
River job stats
SELECT
COUNT(*) AS stuck_count,
COUNT(DISTINCT kind) AS distinct_kinds,
COUNT(DISTINCT queue) AS distinct_queues,
MIN(created_at) AS oldest_created_at,
MAX(created_at) AS newest_created_at,
NOW() - MIN(created_at) AS oldest_age,
NOW() - MAX(created_at) AS newest_age,
AVG(NOW() - created_at) AS avg_age,
PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY EXTRACT(EPOCH FROM NOW() - created_at)) * INTERVAL '1 second' AS median_age,
MIN(attempt) AS min_attempts,
MAX(attempt) AS max_attempts,
AVG(attempt)::numeric(10,2) AS avg_attempts,
COUNT(*) FILTER (WHERE attempted_at < NOW() - INTERVAL '1 hour') AS not_touched_in_1h,
COUNT(*) FILTER (WHERE attempted_at < NOW() - INTERVAL '6 hours') AS not_touched_in_6h
FROM river_jobs.river_job
WHERE state = 'running'
AND created_at < NOW() - INTERVAL '1 day';
[
{
"stuck_count": 5133,
"distinct_kinds": 42,
"distinct_queues": 7,
"oldest_created_at": "2026-02-24 22:08:09.618834+00",
"newest_created_at": "2026-05-25 19:10:35.474235+00",
"oldest_age": "91 days 00:29:38.338464",
"newest_age": "1 day 03:27:12.483063",
"avg_age": "40 days 29:02:53.066961",
"median_age": "1155:35:03.048939",
"min_attempts": 1,
"max_attempts": 4,
"avg_attempts": 1.08,
"not_touched_in_1h": 5133,
"not_touched_in_6h": 5133
}
]
River version
github.com/riverqueue/river v0.31.0
github.com/riverqueue/river/rivertype v0.31.0
Let me know if any other information is helpful
- 主要言語
- Go
- スター
- 6k
- フォーク
- 210
- 平均マージ
- 12時間 2分
- マージ済み PR(30日)
- 24
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
riverqueue/river のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
riverqueue/river#1608 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
riverqueue/river#1599 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
riverqueue/river#1225 · コメント 14 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
riverqueue/river#1185 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
riverqueue/river#1183 · コメント 2 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
riverqueue/river の issue をすべて見る
似ている issue
-
ConcatAgenticMessages loses the approval request ID of a streamed MCP tool call対応中かも @ningsiyuan1024 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
containers/gvisor-tap-vsock#796 ·
メンテナーはふだん 2 日以内に返信
-
external needs:triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
celestiaorg/celestia-node#5448 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hosts対応中かも @huanghaoyuanhhy が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zilliztech/milvus-backup#1418 ·
メンテナーはふだん 1 日以内に返信