How to Fix HTTP 502 Bad Gateway and 504 Gateway Timeout Errors
Step-by-step diagnostic guide for Linux sysadmins. Covers Nginx upstream socket crashes, PHP-FPM pool exhaustion, Out-Of-Memory (OOM) killer terminations, and Cloudflare reverse proxy timeout settings.