Diagnose high CPU or memory on your server
A sluggish server, a fan-hot VPS, or an app that keeps getting killed usually comes down to one thing: something is using more CPU or memory than the box has. Find it, then fix the cause.
Find the culprit
In the web terminal or SSH:
top # press Shift+P = sort by CPU, Shift+M = sort by memoryfree -m # how much memory is actually freeuptime # load average — >number-of-CPUs means overloadedtop shows the process name. That tells you who — now find out why.
Common patterns
| What you see | Likely cause | Fix |
|---|---|---|
| php-fpm / app pegging CPU | a slow or looping request, or real traffic | profile the slow endpoint; add caching |
| MySQL/Postgres high CPU | a missing index, a heavy query | add indexes; find slow queries |
| Memory full, server swapping | too many workers, or a leak | lower worker counts; restart the leaking app; add RAM |
| A cron job spiking on a schedule | a heavy scheduled task | stagger it, or make it lighter → cron jobs |
| Everything slow + disk full | logs/backups filling the disk | → disk & memory |
Spike vs. problem
- A short spike during a traffic burst or a deploy is normal.
- Sustained high load, or an app repeatedly killed for memory, is a real problem — don’t just restart and move on; find the cause.
Bring it down
- Identify the process with
top. - If it’s your app, check its logs for a runaway task or loop.
- Cache repeated work; add DB indexes; move heavy jobs to the background.
- If you’ve genuinely outgrown the box, size up.
OrbixPanel shows per-site CPU, memory, and disk with alerts, so you can see which site is responsible without guessing — see understanding usage limits.
Running OrbixPanel? Per-site resource monitoring and alerts are built in. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.