"Blocking found group but reserve failed" errors on op-worker container plus high CPU usage
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- redis, typescript
調査の方向性
まず、op-worker の Redis groupmq 処理と、"Blocking found group but reserve failed." を含むログを調査します。コンテナとサーバーの再起動後もグループ、ロック、またはジョブがスタックしたままになる仕組みを調べ、その後、worker がエラーを短時間に繰り返したり、ログが際限なく増加したりすることなく復旧することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Hello. First of all, thanks for such a nice application! I've been testing OpenPanel with a few online stores that I host and it's really good.
But today I found a rather unusual problem with my setup. Suddenly, CPU usage on the server I'm running OpenPanel jumped from 6% to 62%. Since I'm working on some integrations I thought maybe I did something wrong, but with help from AI I nailed down what happened.
Somehow the op-worker container (Redis) got stuck with "Blocking found group but reserve failed: group=06da2f33f2dda361f48d404fb2066f43 (reserve took 0ms)" being printed to the log quite rapidly. I don't know much about Redis but AI helped me through it. Somehow this key group got stuck or corrupt or something (I still don't know how, though). This key group was seemingly being used by one of the sites I added to OpenPanel, so in the end I had to wipe up this key group and do some other cleanup.
It first told me to check what's up.
LLEN groupmq:group_events:g:06da2f33f2dda361f48d404fb2066f43:active
ZCARD groupmq:group_events:g:06da2f33f2dda361f48d404fb2066f43
ZRANGE groupmq:group_events:g:06da2f33f2dda361f48d404fb2066f43 0 -1 WITHSCORES
GET groupmq:group_events🔒06da2f33f2dda361f48d404fb2066f43
ZSCORE groupmq:group_events:ready 06da2f33f2dda361f48d404fb2066f43
Then ZRANGE returned two jobs, I had to run these on them:
HGETALL groupmq:group_events:job:<JOB_ID>
EXISTS groupmq:group_events:processing:<JOB_ID>
Then I had to unblock the key group:
MULTI
ZREM groupmq:group_events:ready 06da2f33f2dda361f48d404fb2066f43
DEL groupmq:group_events🔒06da2f33f2dda361f48d404fb2066f43
DEL groupmq:group_events:g:06da2f33f2dda361f48d404fb2066f43:active
EXEC
Then I had to remove those jobs:
- for each <JOB_ID>:
ZREM groupmq:group_events:processing <JOB_ID>
DEL groupmq:group_events:processing:<JOB_ID>
DEL groupmq:group_events:job:<JOB_ID>
DEL groupmq:group_events:g:06da2f33f2dda361f48d404fb2066f43
After that, the stuck key was cleared and everything went back to normal. Before this I tried redeploying OpenPanel, restarted the container, rebooted the server, nothing helped. Clearing that stuck key is what helped. I also had to clear the log files as they grew to over 2 GB.
One thing I found odd though, is (and correct me if I'm wrong) but Redis is an in memory cache, maybe it should have cleared this by itself after a restart?
In any case, this happened to me and I'm posting it here in hopes it could help someone.
- 主要言語
- TypeScript
- スター
- 7.1k
- フォーク
- 516
- 平均マージ
- 4日 40分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Openpanel-dev/openpanel のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Openpanel-dev/openpanel#543 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Openpanel-dev/openpanel#532 ·
メンテナーはふだん 1 日以内に返信
-
Period comparison badge shows wrong percentage for decreases (100 → 50 shows ↓100%)対応中かも @sarmah-rup が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Openpanel-dev/openpanel#526 ·
メンテナーはふだん 1 日以内に返信
-
Self-hosted missing op1-replay.js対応中かも @houstona が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Openpanel-dev/openpanel#512 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
login page needs refinement対応中かも @anandghegde が 33 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Openpanel-dev/openpanel#495 ·
メンテナーはふだん 1 日以内に返信
Openpanel-dev/openpanel の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Chocobozzz/PeerTube#7832 ·
メンテナーはふだん 3 日以内に返信
-
Pay to use?オープン
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
darkreader/darkreader#16108 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Add: Dak Nong TV SDオープンcheck:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug engine
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
frostney/GocciaScript#1746 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
agilepathway/label-checker#739 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信