githubEdit

How to increase CloudFront response timeout to resolve 504 Gateway Timeout errors

If you're experiencing 504 Gateway Timeout errors from CloudFront while your server is still processing requests, you may need to increase the response timeout setting in your CloudFront distribution. Identifying CloudFront 504 errors CloudFront 504 errors typically display the following message: ERROR: The request could not be satisfied 504 Gateway Timeout ERROR The request could not be satisfied. These errors occur when CloudFront times out waiting for a response from your origin server, even though the server may still be processing the request. Adjusting the response timeout To resolve this issue: Navigate to your CloudFront distribution in the AWS Console Locate the response timeout setting (typically found in the origin settings) Increase the timeout value from the current setting (e.g., from 60 seconds to 90 seconds) Save the changes and allow time for the distribution to update Test your long-running requests to verify the 504 errors are resolved The appropriate timeout value depends on your application's processing requirements. Start with a moderate increase and adjust as needed based on your testing results.

Last updated

Was this helpful?