Server-Side Diagnosis
# Check server load
uptime
top -b -n 1 | head -20
# Check if disk I/O is the bottleneck
iostat -x 1 5
# Check memory pressure
free -h
vmstat 1 5Web Server Logs
# Find slow requests in Nginx
awk '{print $NF, $7}' /var/log/nginx/access.log | sort -rn | head -20
# Check for 5xx errors
grep " 500 \| 502 \| 503 " /var/log/nginx/access.log | tail -20Database Performance
# Show running queries
SHOW PROCESSLIST;
# Enable slow query log
SET GLOBAL slow_query_log = ON;
SET GLOBAL long_query_time = 2;PHP-FPM Status
Enable in pool config:
pm.status_path = /fpm-statuscurl http://localhost/fpm-status?fullWatch for high "active processes" — means workers are maxed out.
Network Latency
# Test from external location
curl -w "DNS: %{time_namelookup}\nConnect: %{time_connect}\nTTFB: %{time_starttransfer}\nTotal: %{time_total}\n" -o /dev/null -s https://example.comChecklist
- Is the server overloaded? (CPU, RAM, disk)
- Is the database slow? (slow query log)
- Is PHP running out of workers? (FPM status)
- Is it a network issue? (latency from client to server)
- Are static assets cached? (check cache headers)