I want to increase the default keep-alive and response timeout settings, or request a quota increase for my Amazon CloudFront custom or virtual private cloud (VPC) origin.
Resolution
Note: The origin response and keep-alive timeout values apply only to custom and VPC origins.
Increase the response timeout and keep-alive and settings for your CloudFront distribution
To increase how long CloudFront waits for a response from the origin, update the response timeout value. The default value is 30 seconds, but you can increase the timeout value up to 180 seconds.
To maintain a longer connection to your custom origin after it gets the last response packet, increase the keep-alive timeout value. The default keep-alive timeout value is 5 seconds, but you can increase the timeout value up to 180 seconds.
Complete the following steps:
- Open the CloudFront console.
- In the navigation pane, choose Distributions, and then select your distribution.
- Choose the Origins tab, and then select your origin.
- Choose Edit, and then expand Additional settings.
- For Origin response timeout, enter the new timeout value.
- For Keep-alive timeout, enter the new timeout value.
- Choose Save changes.
Important: If you receive "HTTP 504" errors from CloudFront, then see HTTP 504 status code (Gateway Timeout).
Increase your keep-alive and response timeout quota beyond 180 seconds
If you require a higher value than the maximum 180-second value, then you must submit quota increase request. After you submit your request, you must add a CloudFront quota increase use case description.
Submit a quota increase request
Complete the following steps:
- Open the Service Quotas dashboard.
- For Manage quotas, choose Amazon CloudFront.
- Choose View quotas.
- In the Service quotas search pane, enter either Response timeout per origin or Keep-alive timeout for a custom origin associated with distribution.
- Select either Response timeout per origin or Keep-alive timeout for a custom origin associated with distribution, and then choose Request increase at account level.
- For Increase quota value, enter a quota value that's greater than 180, and then choose Request.
Add a CloudFront quota increase use case description to your request
Complete the following steps:
- Open the Service Quotas dashboard.
- In the navigation pane, choose Quota request history. A list of your quota requests appears.
- For Recent quota increase requests, choose the request that you submitted.
- In Correspondence, choose Reply.
- In the ticket's comment thread, enter the description of your quota increase request, and then choose Submit.
You receive a status update email from AWS Support that either approves or denies the quota increase request. For more information, see Requesting a quota increase.
Important: A quota increase doesn't automatically update your origins. After AWS increases your quota, make sure that you update your distribution origins response timeout and keep-alive timeout values.
Related information
All distribution settings reference
How do I reduce the latency of slow responses from CloudFront?