You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(platform): reserve memory for the database and platform so sandbox sessions cannot starve them #4726
Sandbox sessions start with --oom-score-adj=500 (services/sandbox/src/session/docker-session-args.ts:558), so a host-wide OOM kill picks them before the control plane. Nothing protects the control plane's memory before that point: the CLI's generated stack sets hard mem_limits on backend, sandbox, egress and gateway only (tools/cli/src/lib/compose/services/create-*-service.ts), nothing for db or platform, and no mem_reservation anywhere; the repo's compose.yml has its resource blocks commented out (compose.yml:121-129,320-328). Verified on main at 73d03a9.
Under memory pressure from sessions, the kernel reclaims the database's and the platform's pages as readily as anyone's. That is how a busy host turns into pool timeouts and 503s (the incident in #3977). The spawner's admission reserve (SANDBOX_MIN_FREE_MEMORY, default a tenth of the host and at least 1 GiB, services/sandbox/src/host-memory.ts:59-67) is a reading, not a guarantee.
Suggested fix
Set mem_reservation (cgroup v2 memory.low) on db, platform and backend in the CLI's compose generators and in compose.yml, sized from the deployment defaults; optionally a negative oom_score_adj for db. Default SANDBOX_MIN_FREE_MEMORY to at least their sum so admission and reclaim agree, and document both in the self-hosting docs.
Landed on release/0.6, the 0.6 feature line, with feature train #5329 as 0913747 (feat(cli): reserve memory for the database and the application tier); it ships with Tale 0.6.0. GitHub closes issues only for commits on main, so the feature-train role closes this one. Board task: TALE-135.
Activity
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
tale-code-bot commentedon Nov 2, 2026
Landed on
release/0.6, the 0.6 feature line, with feature train #5329 as 0913747 (feat(cli): reserve memory for the database and the application tier); it ships with Tale 0.6.0. GitHub closes issues only for commits onmain, so the feature-train role closes this one. Board task: TALE-135.feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier
feat(cli): reserve memory for the database and the application tier