Elastic beanstalk 部署时间超过超时时间,如何增加超时时间

编程入门 行业动态 更新时间:2024-10-26 15:18:52
本文介绍了Elastic beanstalk 部署时间超过超时时间,如何增加超时时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

使用 AWS 网站为应用程序部署新环境的 Elastic beanstalk 警告

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 的文件,因为我看不到其他错误,我猜这会导致超时并阻止 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-increase-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 格式.在此之后,您可以使用此版本的源代码更新您的环境.

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:

超时:等待实例完成的秒数执行命令.

Timeout: Number of seconds to wait for an instance to complete executing commands.

例如,如果在您达到配置的超时期限时源代码部署任务仍在运行,AWS Elastic Beanstalk显示以下错误:某些实例没有响应命令.未收到来自 的回复."您可以增加 AWS Elastic Beanstalk 服务的时间等待您的源代码成功部署到实例.

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 ." 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 的更多信息.此处提供了有关选项设置的文档.

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

更多推荐

Elastic beanstalk 部署时间超过超时时间,如何增加超时时间

本文发布于:2023-11-27 02:53:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1636267.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:时间   Elastic   beanstalk

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!