Troubleshooting
Most incidents fall into a small number of patterns. Work from the symptom to the layer, confirm with a command, then apply the smallest fix.
Symptom matrix
| Symptom | Likely layer | First check |
|---|---|---|
502 Bad Gateway | PHP-FPM or upstream | PHP-FPM pool status, error log |
503 Service Unavailable | Maintenance mode or overload | Panel maintenance flag, load average |
504 Gateway Timeout | Upstream too slow | max_execution_time, slow queries |
500 Internal Server Error | Application | Site error log, display_errors off |
| Site unreachable | DNS or firewall | dig, curl -I, port 80/443 |
| SSL error | Certificate | Expiry, chain, hostname mismatch |
| Mail deferred | DNS or quota | SPF/DKIM, mailbox quota, queue |
| Disk full | Storage | df -h, largest directories |
| Panel down | Panel service | systemctl status wasfor-panel |
502 Bad Gateway
The web server could not reach PHP-FPM.
systemctl status php8.3-fpm --no-pager
tail -n 100 /home/acme/sites/app.example.com/logs/error.log
ss -lntp | grep fpm| Cause | Fix |
|---|---|
| FPM pool crashed | Restart the pool; inspect the crash log |
| Socket path mismatch | Re-apply the site PHP version |
| Memory exhausted | Lower memory_limit or add RAM |
| Worker timeout | Raise request_terminate_timeout carefully |
500 Internal Server Error
The application failed. Turn on logging rather than display_errors:
tail -f /home/acme/sites/app.example.com/logs/error.log
grep -i "PHP Fatal" /home/acme/sites/app.example.com/logs/error.log | tail -20Common causes: missing PHP extension, wrong file permissions, stale config cache, failed migration. Fix the cause, then clear caches.
504 Gateway Timeout
The request exceeded a timeout. Compare three values:
Client / proxy timeout ≥ max_execution_time
max_execution_time ≥ expected work
Database query time < max_execution_timeLong jobs belong in a queue worker, not in a web request.
DNS and reachability
dig +short app.example.com A
dig +short app.example.com AAAA
curl -I -H "Host: app.example.com" http://203.0.113.10If the local Host request works but the domain fails, the problem is DNS or the edge firewall, not the application.
SSL failures
openssl s_client -connect app.example.com:443 -servername app.example.com </dev/null 2>/dev/null \
| openssl x509 -noout -dates -subject -issuer| Message | Meaning |
|---|---|
certificate has expired | Renewal failed; re-issue |
unable to verify the first certificate | Incomplete chain |
certificate is valid for … | Hostname mismatch; add an alias |
Mail deferred
mailq | tail -20
grep -i "deferred" /var/log/mail.log | tail -30Check SPF/DKIM/DMARC, mailbox quota, and whether the destination is rate-limiting you. A sudden spike in outbound volume usually means a compromised account or script.
Disk full
df -h
du -xh --max-depth=1 /home | sort -h | tail -10
du -xh --max-depth=1 /var/log | sort -h | tail -10Rotate logs, clear old snapshots, and check for runaway backups. Never delete /var/lib/mysql files by hand.
Database connection errors
systemctl status mariadb --no-pager
mysqladmin status -u root -p| Error | Meaning |
|---|---|
Too many connections | Raise max_connections or fix connection leaks |
Access denied | Wrong user, host or password |
Disk full | See the disk section |
Table is marked as crashed | Restore or run a repair on a stopped server |
Panel not loading
systemctl status wasfor-panel --no-pager
journalctl -u wasfor-panel -n 200 --no-pager
curl -sk https://127.0.0.1:<port>/api/healthIf the health endpoint responds but the UI is blank, check the browser console and the static asset cache. Clear the panel cache and reload.
Escalation
Collect before opening a ticket:
- Exact timestamps with timezone.
- Request IDs and affected URLs.
- Relevant log excerpts.
- What changed immediately before the incident.
- Steps already attempted.
See AI & support for ticket priorities and response targets.