opencode: hardcoded 4Gi memory limit causes OOMKilled / silent session deaths (manifest declares limitedMemory 24Gi)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- helm, kubernetes, yaml
調査の方向性
Start with opencode/templates/opencode.yaml and compare its hardcoded resource limits with the limitedMemory and limitedCpu values in OlaresManifest.yaml. Check how this app's chart exposes resource settings through values.yaml; done when the deployment's memory limit can accommodate the reported workload without repeated OOMKilled restarts.
索引モデルが issue の本文から書いたものです。
説明
Summary
The OpenCode app container ships with a hardcoded resources.limits.memory: 4Gi in opencode/templates/opencode.yaml, while the app's own OlaresManifest.yaml declares limitedMemory: 24Gi / limitedCpu: 13. On an Olares One (96 GB RAM) this 4 GiB cap is routinely exceeded by memory-heavy subprocesses that OpenCode legitimately runs inside its sessions (dev servers, vitest --max-old-space-size=8192, etc.), producing OOMKilled restarts that silently kill every active session.
Evidence (live diagnosis, 2026-08-08)
- Pod
opencodecontainer:reason: OOMKilled,exitCode: 137— 31 restarts in 23 h. - cgroup memory reached 4.26 GiB (over the 4 GiB limit) during a
npx vitest --max-old-space-size=8192run, ~40 s before the next OOM kill. - Every restart kills all in-flight sessions "silently"; reloading afterwards fails with envoy
upstream connect error or disconnect/reset before headers ... Connection refuseduntil the container is back up. - Hardcoded block in
opencode/templates/opencode.yaml:
resources:
limits:
cpu: "4"
memory: 4Gi
requests:
cpu: 200m
memory: 1Gi
vs. the manifest:
requiredMemory: 2304Mi
limitedMemory: 24Gi
limitedCpu: 13
Suggested fix
- Raise the hardcoded container memory limit (e.g. 8–12 GiB) to match the declared
limitedMemory: 24Gi, and/or - Make the resource limits configurable via
values.yaml/ an env var instead of hardcoding them.
Workaround (applied successfully)
Patching the Deployment to limits.memory: 12Gi resolves the OOM loop (0 restarts after rollout).
Environment
- Olares app:
opencode1.0.18 (imagebeclab/opencode:1.18.9.1), sourcemarket.olares - Olares One, 96 GB RAM / 24 cores, NVIDIA RTX 5090
- 主要言語
- Go Template
- スター
- 56
- フォーク
- 44
- 平均マージ
- 10時間 39分
- マージ済み PR(30日)
- 211
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
beclab/apps のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[supabase][0.0.15] olares-envoy-sidecar CrashLoopBackOff: gateway Envoy collides on base_id=0 (fix: --disable-hot-restart)対応中かも @ethanwheatthin が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
awaiting triage
難易度 3/5 1〜2日 初心者へのやさしさ 51/100
beclab/apps#4062 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
agent/quality testing
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
cncf/techdocs#463 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
data-pipeline
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
tagbot-manual
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
SciML/MonteCarloIntegration.jl#49 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
seabbs/bdbv-hub-modelling#1500 ·
メンテナーはふだん 1 日以内に返信