fix(selfhost): add memory limits to docker-compose services#2569
Conversation
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-02 09:39:51 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2569 +/- ##
==========================================
+ Coverage 95.95% 95.98% +0.02%
==========================================
Files 226 229 +3
Lines 25427 25816 +389
Branches 9245 9391 +146
==========================================
+ Hits 24399 24780 +381
- Misses 417 425 +8
Partials 611 611 🚀 New features to boost your workflow:
|
No service declared a memory or CPU limit, including the core gittensory app itself. Any --profile combination let one runaway optional service (Ollama loading a multi-GB model, Postgres, Qdrant, or the whole observability stack) exhaust host RAM and OOM-kill or starve the core review pipeline container instead of the intended optional service -- the exact gap #1828 calls out, with zero mitigation anywhere in the compose file. Add deploy.resources.limits.memory to the core gittensory/redis services and every heavyweight optional service (postgres, qdrant, ollama, prometheus, loki, tempo, grafana), each overridable via a documented .env variable so an operator can size a bigger/smaller host without editing the compose file.
…ource-limits test
cdd5ce0 to
7c16a3f
Compare
Summary
docker-compose.ymldeclared a memory or CPU limit, including the coregittensoryapp itself. Any--profilecombination let one runaway optional service (Ollama loading a multi-GB model, Postgres, Qdrant, or the whole observability stack) exhaust host RAM and OOM-kill or starve the core review pipeline container instead of the intended optional service — the gap perf(selfhost): profile stack resources and tune defaults #1828 calls out, with zero mitigation anywhere in the compose file.deploy.resources.limits.memoryto the coregittensory/redisservices and every heavyweight optional service (postgres,qdrant,ollama,prometheus,loki,tempo,grafana), each overridable via a documented.envvariable (GITTENSORY_MEM_LIMIT,OLLAMA_MEM_LIMIT, etc.) so an operator can size a bigger/smaller host without editing the compose file.docker compose --profile postgres --profile pgbouncer --profile qdrant --profile ollama --profile observability config(and confirmed the resolved byte values, e.g.8g→8589934592).Closes #2495.
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — this is adocker-compose.yml/.env.example/test/**change with nosrc/**lines, so it carries no Codecov patch obligation; the new structural YAML assertions pass.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateSafety
UI Evidencesection below — N/A, no UI changes.Notes