Analyze server errors (5xx) in the access log
where do the 500 errors come from | find internal server error in log | analyze 502 and 504 errors | which page throws server errors | awk | access-log | 500 | troubleshootingawk '$9 ~ /^5[0-9][0-9]$/ {print $9, $7}' /var/www/vhosts/system/example.com/logs/access_ssl_log | sort | uniq -c | sort -rn | head -20Prints status code and URL of every request with a 5xx response, grouped and sorted by frequency. This helps narrow down whether a single script is failing or the whole site is affected. The exact cause is then usually found in the error_log of the same domain.
Note: On Plesk with nginx, 502 and 504 errors often appear only in proxy_access_ssl_log, because Apache or PHP-FPM never responded.
Also searched as
- where do the 500 errors come from
- find internal server error in log
- analyze 502 and 504 errors
- which page throws server errors