High CPU Usage Checklist for VPS Websites
High CPU usage can make a VPS slow, unstable or unable to serve requests. For websites and automation stacks, CPU spikes often come from bot traffic, PHP workers, MySQL queries, backup jobs, imports, Docker containers or cron tasks.
Core principle
CPU is not the root cause by itself. It tells you that something is working too hard. Your job is to find the process, request pattern or scheduled task responsible for the load.
Checklist
- Check current CPU load.
- Find the top CPU-consuming processes.
- Identify whether the process is Nginx, PHP-FPM, MySQL, Docker or a script.
- Check Nginx access logs for request spikes.
- Check if a backup, import or cron job is running.
- Check whether MySQL is handling heavy queries.
- Check Docker containers if automation services are running.
- Reduce abusive traffic if confirmed.
- Pause heavy background jobs if needed.
- Document the real source of CPU load.
Reusable lesson
High CPU from real traffic, bot traffic, database work and background jobs require different fixes. Do not solve all CPU spikes with the same action.
When to Use This Checklist
Use this checklist when a VPS website becomes slow, unstable or overloaded because CPU usage is high.
Required Tools
SSH access, top or htop, Nginx logs, process list, Docker if used, cron access, MySQL access
Before You Start
Do not kill processes randomly. First identify whether the CPU load comes from traffic, database, PHP, Docker or scheduled jobs.
Structured Checklist Steps
- Check CPU load.
- Find top CPU processes.
- Identify process type.
- Check access logs.
- Check cron jobs.
- Check MySQL activity.
- Check Docker containers.
- Pause confirmed heavy jobs.
- Mitigate abusive traffic.
- Document cause.
Verification Steps
- Top CPU process is known.
- Traffic pattern is checked.
- Background jobs are reviewed.
- CPU drops after mitigation.
- Website remains accessible.
Rollback Plan
If stopping a process breaks the site, restart the required service and investigate logs before taking stronger action.
Common Mistakes
- Killing MySQL without understanding impact.
- Ignoring bot traffic.
- Forgetting cron jobs.
- Confusing short spike with chronic overload.
- Upgrading VPS before finding root cause.
Related Commands
top
ps aux --sort=-%cpu | head
sudo tail -n 100 /var/log/nginx/access.log
crontab -l
docker ps
docker stats
sudo systemctl status mysql