# Troubleshoot 502 errors

Source: https://docs.fortrabbit.com/dev/http-status-codes/others/502
Reviewed: 2026-07-09


- 502 errors will usually be shown on screen immediately
- 502 errors often occur after code or configuration changes
- 502 errors are sometimes just printed as a "service unavailable" message, check the browser's developer tools for the response's HTTP status code to be sure this is indeed a 502 error
- 502 errors here are often rendered using a fortrabbit error page template

A 502 means a gateway received an invalid or empty response from upstream. Most PHP-FPM problems on fortrabbit — the process not running, overloaded, or timing out — surface as a [503](/dev/http-status-codes/503) or [504](/dev/http-status-codes/504), not a 502. Check those first when the PHP engine is the suspect.

**In some cases this is not a server issue, but something with your code and configuration.** Good news is that they are mostly easy to debug for you.

## Check the logs

Examine the logs of your environment. See [here](/platform/settings/logs). There you'll likely find the error message and where the application exited. Compare this with your local development environment and see if it fails the same way. Review your latest code changes.

## It could also be something on our side

It is also possible that this error is caused by a network, hardware or configuration issue on our side, your hosting provider. Please check our status page at [status.fortrabbit.com](https://status.fortrabbit.com) if there are any ongoing maintenance windows or service issues known.
