Docs / Troubleshooting / Debugging Slow Website Performance

Debugging Slow Website Performance

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 30 views · 1 min read

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 5

Web 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 -20

Database 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-status
curl http://localhost/fpm-status?full

Watch 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.com

Checklist

  1. Is the server overloaded? (CPU, RAM, disk)
  2. Is the database slow? (slow query log)
  3. Is PHP running out of workers? (FPM status)
  4. Is it a network issue? (latency from client to server)
  5. Are static assets cached? (check cache headers)

Was this article helpful?