Troubleshoot 502 errors

❗

Bad Gateway.

A 502 Bad Gateway means a server that forwards requests got an invalid or empty answer from the server behind it. On fortrabbit, failing PHP processes show as 503 or 504, so a 502 is rare.

Where a 502 comes from

SeenLikely source
A Cloudflare or CDN error pageThe CDN could not get a valid answer from fortrabbit. Check the domain's DNS and TLS settings in Cloudflare
The fortrabbit 502 pageA part of the platform got no valid answer from the environment
The app's own error pageThe app calls another service that failed, and passes the 502 on

A PHP process that crashes or runs too long answers with a 503 or a 504. Check those pages first when the app itself is the suspect.

What to check

When the 502 stays and the logs show nothing, check the fortrabbit status page for incidents.

Written by a human. Review, grammar checks and typo fixes by AI.

AI use & editorial processEdit on GitHub ↗