504 ERROR The request could not be satisfied
CloudFront timed out waiting for the origin
Seen in AWS CloudFront
CloudFront could not connect to the origin, or the origin did not respond before the origin response timeout.
Common causes
- A security group, network ACL or firewall does not allow CloudFront to reach the origin.
- The origin is slower than the origin response timeout (30 seconds by default).
- The origin is down or overloaded.
How to fix it
- Allow CloudFront on the origin, e.g. with the AWS-managed prefix list com.amazonaws.global.cloudfront.origin-facing.
- Speed up slow requests, or raise the origin response timeout in the origin settings.
- Check origin health and its logs at the time of the error.
Got a different message? Paste it into the error explainer.
Related errors
- Error 521: Web server is down · Cloudflare could not connect to your origin
- Error 522: Connection timed out · Cloudflare timed out connecting to your origin
- 502 Bad Gateway · The proxy got a bad response from the server behind it
- 503 Service Unavailable · The server is temporarily unable to handle requests
- 504 Gateway Timeout · The server behind the proxy took too long
- Error 520: Web server is returning an unknown error · Cloudflare got an empty or invalid response
- Error 525: SSL handshake failed · Cloudflare could not complete TLS with your origin
- Error 526: Invalid SSL certificate · Cloudflare doesn't trust your origin's certificate
- 429 Too Many Requests · You've hit a rate limit
- 400 Bad Request · The server could not understand the request
- 401 Unauthorized · The request needs valid credentials
- 403 Forbidden · The server refuses to allow this request