Table of Contents
502 Bad Gateway
Bad Gateway errors occur when the PHP process has not responded "normally". This is often for the following reasons,
- PHP code error
- Badly written PHP code that crashes the PHP process
- PHP service restarts, caused by
- Excessive traffic
- Blocking external requests (like slow SQL, or a blocking external CURL request)
In the majority of cases, the triggers for a bad gateway error are from poorly written code not due to anything server-side.
See PHP Error Logs for more information.