If your website is suddenly displaying a 504 Gateway Timeout error there's no need to panic but there may be something that's not working with your website.
What Causes 504 Errors?
504 errors occur when PHP cannot complete a request in a timely fashion. This can often be a web service or 3rd party API that fails to respond in time, thumbnail processing for many or large images or a poorly optimized script/snippet that is not able to complete. Furthermore, poorly optimized queries or custom tables without indexing can cause the database server to not return a result before PHP times out.
It's important to note that it can be a combination of any or none of these causes.
Is it MODX Cloud?
In MODX Cloud 504 errors are almost always isolated to the specific Cloud instance and are not normally the result of platform issues. If you would like to check for platform issues at any time, you can refer our Status Page.
Locate your Cloud URL and Contact Support
When you receive a 504 error you can contact MODX Cloud Support:
- Locate your Cloud Address of the Cloud: e.g., c0000.paas0.abc.modxcloud.com. It is located on the Summary tab of the Edit view for the Cloud you are experiencing the 504 error on.
- Then, click the Help button, located at the bottom right of the Dashboard and click on the Contact Us button to submit your help request.
We may be able to restart your PHP worker pool and help your site recover. If the problem is caused by one of the issues noted above, it's possible that it will recur until the issue has been diagnosed and corrected.
Diagnosing the Cause
To try to determine the cause, if it is persistent, you can review the documentation for using Error & Access Logs, to help you track things down.