Skip to main content

CloudFront response timeouts

If you're performing a particularly long operation (e.g. the user submitted an AJAX request to perform some task, and the server doesn't respond for a while), CloudFront can cut off the connection with a 504 error.

In the CloudFront Console -> <your distribution> -> Origins, you can see the timeout options in the Additional Settings dropdown when editing an origin.

image.png

The max is 60, so if you have any long-running operations, you can't just set your PHP or webserver timeouts, as CloudFront will time out the connection on its own.