【问题标题】:Environment status becomes severe when second environment is deployed部署第二个环境时,环境状况变得严峻
【发布时间】:2019-06-28 04:27:54
【问题描述】:

我使用 elasticbeanstalk 将示例 django 项目上传到 AWS。 我根据https://colintoh.com/blog/how-to-deploy-application-to-aws-elastic-beanstalk 的教程部署了两个环境。

当我部署(使用 eb cli 创建)第二个环境时,第一个环境 helth 更改为服务器在 elasticbeanstak 控制台上显示错误

100.0 % of the requests are erroring with HTTP 4xx. Insufficient request rate (12.0 requests/min) to determine application health.
ELB processes are not healthy on all instances.
ELB health is failing or not available for all instances.

但是,当我访问这两个页面时,它们似乎工作正常,因为它们都显示 django 的第一页调试消息

The install worked successfully! Congratulations!
You are seeing this page because DEBUG=True is in your settings file and you have not configured any URLs.

我可以忽略错误还是我需要做一些事情来修复错误(以及如何修复它)?

【问题讨论】:

    标签: django amazon-web-services development-environment production-environment amazon-elastic-beanstalk


    【解决方案1】:

    零流量的应用程序的正常行为。 更高级一点,但您可以向负载均衡器添加一个健康检查路径,它会产生“一些”流量。

    在控制台中还有一个选项(环境 -> 配置 -> 监控)来忽略 4XX 错误。

    【讨论】:

    • 我有两个具有相同配置和相同项目的环境,另一个的运行状况是绿色的,因此零流量的应用程序可以具有绿色运行状况。
    【解决方案2】:

    默认情况下,Elastic Beanstalk 通过向/ 路径发送请求来检查您的环境的运行状况,并期望它返回200 代码。 也许您的项目中不存在这条路线。 如果需要,您可以配置 EB 将发送请求以检查运行状况的路径。在您环境的配置面板中,转到负载均衡器并编辑默认进程以更改Health check path

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-10-23
      • 1970-01-01
      • 1970-01-01
      • 2019-11-21
      • 1970-01-01
      • 2013-01-24
      • 2015-07-29
      • 2013-01-27
      相关资源
      最近更新 更多