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 ?
According to the official documentation you can pass
--timeout
option to youreb create
call.I've just been doing it at time of deployment for my environment and it works fine this way too.
..and that gives me 30 minutes.
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:
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:
You can read more about ebextensions here. Documentation on option settings is available here.
Use: --timeout
For eg:
eb create -db --timeout 20
This will give you 20 minutes of timeout limit.