Skip to content
Skip the docs menu

Guide

Fix "504 Gateway Timeout"

A page shows 504 Gateway Timeout because it took longer than the site allows. Find the page, then allow longer requests in one click if it really needs it.

Last updated 1 min read3 stepsView as Markdown

What you will end up with

The same page now finishes. Longest request in Limits shows your choice, with the technical values beside it.

Go to the first step
On this page

"504 Gateway Timeout" means the web server stopped waiting for your app. Either the page really needs longer (an import, a report, a big export), or it is stuck waiting on the database or another website.

What you need#

  • A role that may change the site: owner, admin or developer.

Steps#

  1. Find the page. Open the site's Monitoring & logs › Logs and choose Show me what went wrong. The 504 is explained in plain words, with the address that took too long.

  2. Decide if it should take that long. An import or a report can; a normal page should not. A slow normal page usually waits on the database: fix the page rather than the limit.

  3. Allow longer requests. Choose Fix this, or open the site's Settings › Limits and easy fixes › Fix a common error › 504 Gateway Timeout, and choose Allow 5 minutes (or 30 minutes, or 1 hour).

    Fix a common error with the 504 card open: Allow 5 minutes, 30 minutes or 1 hourFix a common error with the 504 card open: Allow 5 minutes, 30 minutes or 1 hour

    One click sets the web server, PHP and the app together. Each one checks its new settings first and keeps the previous ones if anything fails.

What you should see#

The same page now finishes. Longest request in Limits shows your choice, with the technical values beside it.

If it goes wrong#

  • Still 504 after the change: the page takes longer than the new limit. Choose a longer one, or move the work to a background job.
  • The whole site gets slow: long requests keep PHP workers busy. Look at Recommended settings on the server to see how many workers fit in its memory.
  • A Node.js or Python app: the app can have its own time limit too. Node.js allows 5 minutes by default.

Still stuck? Get help

Docs menu