弹性魔豆的部署时间超过超时时间,如何增加超时时间 [英] Elastic beanstalk deployment taking longer than timeout period, how do I increase timeout period

查看:198
本文介绍了弹性魔豆的部署时间超过超时时间,如何增加超时时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

弹性魔豆部署一个新的环境,使用AWS网站上的应用程序警告

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

,虽然它最终显示环境绿化试图连接到URL只是给

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. 

应用程序的早期版本工作正常,但在ebextensions它复制从S3大文件,然后将其解压缩,这需要相当长一段时间。该应用程序的早期版本只需要复制一个3GB的文件,但新版本有复制6GB文件,因为我看不出有什么其他错误即时猜测这造成超时和prevented tomcat的开始。

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 ?

推荐答案

您可以通过选项设置做到这一点。选项​​设置可以使用ebextensions指定。

You can do this using option settings. Option settings can be specified using ebextensions.

在一个名为目录中创建你的应用程序的源文件 .ebextensions 。可以说,该文件是 .ebextensions / 01-增加-timeout.config

Create a file in your app source in a directory called .ebextensions. Lets say the file is .ebextensions/01-increase-timeout.config.

该文件的内容应该是:

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

请注意这个文件是YAML格式。 在此之后,你可以用这个版本的源$ C ​​$ C更新您的环境。

Note this file is in YAML format. After this you can update your environment with this version of source code.

从该选项设置文档:

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 <instance id>." You can increase the amount of time that the AWS Elastic Beanstalk service waits for your source code to successfully deploy to the instance.

您可以阅读更多有关ebextensions 这里。在选项设置文档是href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html" rel="nofollow">此处提供

You can read more about ebextensions here. Documentation on option settings is available here.

这篇关于弹性魔豆的部署时间超过超时时间,如何增加超时时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆