作为我的应用程序部署的一部分,我在.ebextensionsconfiguration文件中有一些commands 。 所有命令可能需要20分钟或更长时间才能完成,第一次运行命令(克隆大型存储库)。
不幸的是,这会在部署期间触发超时:
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].
是否有可能增加这个超时? 我在我的环境设置中找不到该选项。
您可以将AWS Elastic Beanstalkconfiguration文件 (.ebextensions)添加到Web应用程序的源代码中,以configuration您的环境并自定义其包含的AWS资源。
configuration文件的option_settings部分定义configuration选项的值。 通过configuration选项,您可以configurationElastic Beanstalk环境,其中的AWS资源以及运行应用程序的软件。
将configuration文件添加到名为.ebextensions的文件夹中的源代码,并将其部署到应用程序源包中。
例:
option_settings: - namespace: aws:elasticbeanstalk:command option_name: Timeout value: 1000
*“值”表示以秒为单位的超时前的时间长度。
参考资料:官方的AWS Elastic Beanstalk 环境configuration和所有环境的一般选项 , 这个 stackoverflow的答案和这个 AWS开发者论坛的post。
你可以把这个回收站放进一个AMI,并且有弹性的豆杆使用。 这样的结帐没有这么长时间。
另一个说明,你在做什么克隆大量回购作为部署的一部分?