An HTTP 504 response means a gateway or proxy did not receive a timely response from an upstream server required to complete the request.
- Determine whether a simple/static page responds normally while a dynamic request times out.
- Check application logs for a long database query, remote API call, import, export, or PHP process that runs longer than expected.
- Review Resource Usage for CPU, memory, process, I/O, or entry-process faults at the same time.
- Check whether the failure began after changing PHP, a plugin, a theme, or application code.
- Reduce the failing operation into smaller work units when the application supports it.
Increasing a timeout can mask a slow or stuck operation. Identify why the upstream response is late before treating a larger timeout as the solution.