Elastic beanstalk deployment of a new environment for an application using the AWS website warns
Create environment operation is complete, but with command timeouts. Try increasing the timeout period
and although it eventually shows environment as green trying to connect to the url just gives
Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
An earlier version of the application works fine, but in the ebextensions it has to copy a large file from s3 and then unzip it, this takes quite a while. The earlier version of the application only has to copy a 3GB file but the new version has to copy a 6GB file and as I can see no other errors Im guessing this has caused the timeout and prevented tomcat starting.
But how do I increase the timeout, I cannot see where I am meant to do it ?
You can see that for eb deploy when there are no Docker cache layers, there is about a 1 minute and 26 seconds deployment speed improvement.
To maintain full capacity during deployments, you can configure your environment to launch a new batch of instances before taking any instances out of service. This option is known as a rolling deployment with an additional batch.
Elastic Beanstalk isn't great if you need a lot of environment variables. The simple reason is that Elastic Beanstalk has a hard limit of 4KB to store all key-value pairs. The environment had accumulated 74 environment variables — a few of them had exceedingly verbose names.
You can do this using option settings. Option settings can be specified using ebextensions.
Create a file in your app source in a directory called .ebextensions
. Lets say the file is .ebextensions/01-increase-timeout.config
.
The contents of the file should be:
option_settings: - namespace: aws:elasticbeanstalk:command option_name: Timeout value: 1000
Note this file is in YAML format. After this you can update your environment with this version of source code.
From documentation for this option setting:
Timeout: Number of seconds to wait for an instance to complete executing commands.
For example, if source code deployment tasks are still running when you reach the configured timeout period, AWS Elastic Beanstalk displays the following error: "Some instances have not responded to commands. Responses were not received from ." You can increase the amount of time that the AWS Elastic Beanstalk service waits for your source code to successfully deploy to the instance.
You can read more about ebextensions here. Documentation on option settings is available here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With