21

As part of my application deployment, I have some commands in my .ebextensions config files. It might take 20 minutes or more for all the commands to complete, the first time the commands are run (cloning big repositories).

Unfortunately, this triggers a timeout during deployment:

INFO Deploying new version to instance(s).
WARN The following instances have not responded in the allowed command
     timeout time (they might still finish eventually on their own).
INFO Command execution completed. Summary: [Successful: 0, TimedOut: 1].

Is it possible to increase this timeout? I can't find the option in my environment settings.

BenMorel
  • 4,215
  • 10
  • 53
  • 81
  • 1
    GIYF, you can use ebextensions: http://stackoverflow.com/questions/25557874/elastic-beanstalk-deployment-taking-longer-than-timeout-period-how-do-i-increas – Lucas Carvalho Jan 08 '16 at 16:19
  • Thanks for the pointer, if you add a summary of the linked answer below, I will mark your answer as accepted! – BenMorel Jan 08 '16 at 20:13

2 Answers2

18

You can add AWS Elastic Beanstalk configuration files (.ebextensions) to your web application's source code to configure your environment and customize the AWS resources that it contains.

The option_settings section of a configuration file defines values for configuration options. Configuration options let you configure your Elastic Beanstalk environment, the AWS resources in it, and the software that runs your application.

Add configuration files to your source code in a folder named .ebextensions and deploy it in your application source bundle.

Example:

option_settings:
    - namespace: aws:elasticbeanstalk:command
      option_name: Timeout
      value: 1000

*"value" represents the length of time before timeout in seconds.

References: Official AWS Elastic Beanstalk Environment Configuration and General Options for All Environments, this stackoverflow answer and this AWS Developers Forum post.

Lucas Carvalho
  • 531
  • 4
  • 10
0

you can bake the repos into the an AMI and have elastic beanstalk use that. That way the checkout isnt so long.

On another note, what are you doing cloning massive repos as part of deployment?

Alex
  • 246
  • 1
  • 2
  • I've always been reluctant to using a custom AMI, to keep it simple. Your last note is a good point, though. My app has a built-in logo generator, which needs an extensive list of fonts to offer the user to choose from. I don't want to bundle these fonts with my app to keep the size within reasonable limits, so my deployment scripts clone a big repository once the app is pushed to the servers. This may not be the best approach, but this is the best one I've found so far. – BenMorel Jun 27 '14 at 10:17