opencode: hardcoded 4Gi memory limit causes OOMKilled / silent session deaths (manifest declares limitedMemory 24Gi)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- helm, kubernetes, yaml
- Lĩnh vực
- infrastructure
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go Template
- Star
- 56
- Fork
- 44
- Merge trung bình
- 10 giờ 39 phút
- Pull request đã merge (30 ngày)
- 211
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của beclab/apps
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[supabase][0.0.15] olares-envoy-sidecar CrashLoopBackOff: gateway Envoy collides on base_id=0 (fix: --disable-hot-restart)Có thể đã có người làm @ethanwheatthin đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Update App] LeantimeĐang mởawaiting triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 51/100
beclab/apps#4062 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Emulator tests fail on mainĐang mởarea: ci
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
GlassworksHQ/glassworks#1548 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent/quality testing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
cncf/techdocs#463 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Data refresh is failingĐang mởdata-pipeline
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
tagbot-manual
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
SciML/MonteCarloIntegration.jl#49 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
seabbs/bdbv-hub-modelling#1500 ·
Maintainer thường phản hồi trong vòng 1 ngày