How to increase Docker pull timeout in Elastic Beanstalk?

0

Hello, I am working on deploying an application that is packaged using Docker onto Elastic Beanstalk with a single EC2 instance currently.

I have a multi-stage Dockerfile that is as small as I could possibly make it. Initially, I tried to deploy it to Elastic Beanstalk by deploying my Dockerfile, but the builds took too long so it would fail.

So currently, I am building my image locally, pushing it to an AWS ECR repository, then deploying to elastic beanstalk using a Dockerrun.aws.json file. This, however, still gets timeout errors on deployment! When looking at the logs, it appears the build gets stopped because the command used to pull my pre-built image takes too long to download for some reason. So is there any way to increase this timeout?

I have already tried running eb deploy with the --timeout flag, but it doesn't seem to change anything. I have also tried making a config file to increase the timeout:

.ebextensions/increase-timeout.config

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

But that also fails to change the 300 second timeout.

Does anyone have any idea of how I could fix this? Thanks!

1 Answer
0

A Docker engine timeout settings in backend code as “const (defaultCommandTimeout = 300)”. The aws:elasticbeanstalk:command timeout option (Timeout config in Console, default is 600s) is in fact applied. Nevertheless, this applies for the whole Beanstalk deployment. The commands during building Docker app are timing out before and failing. The 300 seconds timeout is fixed and cannot be modified at the moment.

Please create a support case to AWS with below information that helps AWS support team to provide work around if available.

  1. A time frame when the issue appears.
  2. Upload failed log files.
  3. Dockerfile / docker-compose.yaml / Dockerrun.aws .json files
  4. The size of the image you would like to pull from ECR, also cloud you please kindly provide some context of the image if it’s with a large size.
AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions