Troubleshooting
Server Troubleshooting: Diagnosing and Fixing Common Issues
A systematic approach to diagnosing SSH issues, high CPU, disk full, and network problems.
Published May 10, 2025Updated May 28, 202610 min readIntermediate
Table of Contents
Server Not Responding — First Steps
- Try to ping the server:
ping YOUR_SERVER_IP— if this fails, the server may be offline - Log in to VirtFusion and check the power state — is it running?
- Check the bandwidth graph — unusually high traffic may indicate a DDoS
- Open the VNC console in VirtFusion for direct terminal access
SSH Connection Refused
Common causes and fixes:
| Symptom | Likely Cause | Fix |
|---|---|---|
| Connection refused | SSH service stopped | VNC console → systemctl start sshd |
| Connection refused | UFW blocking port 22 | VNC console → ufw allow ssh |
| Connection timed out | Server offline or wrong IP | Check VirtFusion, verify IP |
| Permission denied | Wrong key / password auth disabled | Use VNC console to add correct key |
| Too many auth failures | fail2ban banned your IP | VNC → fail2ban-client set sshd unbanip YOUR_IP |
High CPU Usage
# Find top CPU consumers
top # Press 'P' to sort by CPU
ps aux --sort=-%cpu | head -20
# Check if it's a specific service
systemctl status nginx
systemctl status php8.3-fpm
systemctl status mysql
⚠️ If you see unknown processes like
xmrig, minerd, or random strings consuming 90%+ CPU — your server may be compromised. Immediately change all passwords and review crontabs and authorized_keys.Disk Full — Free Space Fast
df -h # Check disk usage
du -sh /* 2>/dev/null | sort -rh | head -20 # Find large directories
# Common cleanup commands
apt clean && apt autoremove -y # Package cache
journalctl --vacuum-size=200M # System logs
docker system prune -a # Docker images/containers
find /var/log -name "*.log" -size +100M # Find large log files
Website Returning 502 Bad Gateway
502 means Nginx can't reach the upstream app (PHP-FPM, Node.js, etc.):
systemctl status php8.3-fpm # Is PHP-FPM running?
systemctl restart php8.3-fpm # Restart it
tail -f /var/log/nginx/error.log # Check Nginx error log
journalctl -u php8.3-fpm -n 50 # Check PHP-FPM logs
Out of Memory — Server Keeps Crashing
free -h # Check available memory
cat /var/log/syslog | grep -i "oom" # OOM killer events
# Add swap space (see swap guide)
fallocate -l 2G /swapfile && chmod 600 /swapfile
mkswap /swapfile && swapon /swapfiletroubleshootingSSHdiskCPUdebugging
Was this article helpful?
