Documentation
Quick start + feature guide for every section and device (continuously updated)
Crash Prevention
This document explains the panel's "Crash Prevention" feature — automatically monitoring memory, CPU, and disk, and proactively intervening before server resources are exhausted to prevent the server from freezing.
In a Nutshell
The thing a server fears most is not "a program throwing an error", but "memory being eaten up / CPU maxed out, so the whole machine freezes to the point that even SSH cannot connect, leaving you no choice but to force a reboot from the hosting provider's console." Crash Prevention is about catching the resource-hogging process before that happens and handling it, keeping you a way out.
Overview
Crash Prevention deploys a lightweight daemon on the target server that continuously monitors memory, CPU, and disk. When resources become abnormal it intervenes automatically (killing the offending process) to prevent the server from becoming completely unreachable due to OOM (out of memory) or CPU explosion.
Why You Need It (What OOM / CPU Explosion Are)
- OOM (Out Of Memory): a program has a memory leak, or requests too much memory at once, filling up all of the server's memory. To protect itself, the system starts "killing processes" — but often takes out critical services along with them, or even freezes the whole machine.
- CPU explosion: a program falls into an infinite loop or abnormal computation and maxes out every CPU core. At that point SSH cannot connect, the panel cannot connect, and the only option is a hard reboot.
These failures are usually gradual — first a process slowly eats up resources, and only at the end does the machine freeze completely. Crash Prevention's job is to step in "before it becomes irreversible".
Protection Thresholds (Defaults)
| Protection | Default Threshold | Behavior |
|---|---|---|
| Memory | Available memory < 8% | Triggers intervention, kills abnormal processes using > 15% (5-minute cooldown to avoid frequent false kills) |
| CPU | Load > cores × 3 | Only acts after 3 consecutive over-threshold checks; only kills a single process using > 30% |
| CPU extreme | Load ≥ threshold × 4 | Intervenes immediately, without waiting for the consecutive count (prevents CPU explosion from happening before you can react) |
| Disk | Usage > 92% | Alert only (does not auto-delete files) |
> These are verified, conservative defaults — most servers can use them as-is with peace of mind. To customize, adjust the thresholds in the Crash Prevention panel.
Use Cases
- Servers running memory-unstable programs (e.g. certain Java applications, crawler scripts)
- Servers with small memory that is easily filled up
- Wanting a "last line of defense" as a safety net to avoid a freeze in the middle of the night with no one watching
How to Use
1. Go to the target server's "Server Management panel → Crash Prevention"
2. Click "One-click Deploy"; the panel deploys the daemon on the target server over SSH
3. After deployment, it shows "daemon running" and lists the current protection threshold descriptions
4. When protection triggers, view "Alert Events" for: trigger time, cause (which process, how much resource it used), and the action taken
Deployment Mode
- Servers with systemd (Debian/Ubuntu/CentOS, etc.): deployed as a systemd service with auto-start on boot + automatic restart on crash (shows the "auto-start on boot" badge)
- Servers without systemd (Alpine, etc.): falls back to running via
nohup(still monitors, but will not auto-restart after a reboot; you must redeploy manually)
Notes
1. Zero footprint: the daemon is an independent lightweight script that consumes minimal resources and does not affect the target server's workload.
2. Whitelist protection: kernel threads and critical system processes are not killed by default, avoiding false kills that could crash the system.
3. Disk is alert-only, no cleanup: a full disk will not auto-delete your files (avoiding accidental deletion of important data); it only reminds you to handle it manually.
4. Uninstall: click "Uninstall" in the Crash Prevention panel to clean up the daemon and the systemd service.