levelrail-cli system health.
What is measured
- Process: goroutines, heap in use, last GC pause.
- Database: query latency p50, p95 and p99, writes that waited for the single SQLite connection (the write queue), write ahead log size, and a slow query log.
- Reconcile loop: last pass duration, p50 and p95, the slowest controller, and seconds since the last pass finished (event lag).
- Live streams: open log, deploy and event streams against the cap.
- Footprint: resident memory, OS threads, CPU, the metrics database size, the soft memory limit, and every background loop with its interval, last run and share of a core. See Performance budget.
Findings and fixes
Each measurement above its threshold becomes a warning, or critical at twice the threshold. Where the control plane can fix it, the page shows a button.
Goroutines, heap, reconcile pass, event lag and stream findings have no automatic fix. The page says what to look at, and a restart (
system restart) is the last resort.
Applying a fix needs a root token. Reading health needs read access. The API is GET /api/v1/system/control-plane-health and POST /api/v1/system/control-plane-health/fix with {"fix": "<id>"}.
Guards that are always on
- Live streams (deploy logs, resource logs, pipeline logs, the deployments stream) are capped. Past the cap a new stream gets
503withRetry-After. SetAPP_MAX_LIVE_STREAMS(default 500). - The write ahead log is checkpointed every minute and capped at 64 MiB after a checkpoint, so a long reader cannot let it grow without bound.
- The app list is paginated (
limit,offset) with a hard cap, and API requests are rate limited per actor.
Thresholds
See Benchmarks for measured latency at 1000 apps.