【问题标题】:AWS - How to set HTTP 502 timeout?AWS - 如何设置 HTTP 502 超时?
【发布时间】:2018-01-07 08:16:17
【问题描述】:

我们有一个运行 api 的 elasticbeanstalk 应用程序。现在,对 API 的请求通常需要几十秒才能得到满足。我曾经在发送请求 60 秒后为请求获取 http 504 Gateway_Timeout。

So I set the 'Idle timeout' of the load balancer to 1800s.

现在我在 60 秒后收到 http 502 代理错误:

如何解决它,以便即使请求花费的时间超过 60 秒,我也不会收到 http 500 错误?

感谢任何建议。谢谢。

【问题讨论】:

    标签: amazon-web-services http amazon-elastic-beanstalk http-status-code-504


    【解决方案1】:

    我怀疑它根本不是弹性负载均衡器,而是驻留在弹性 beanstalk 环境容器中的 HTTP 服务器。

    您需要配置此服务器的超时时间。这通常可以通过“.ebextensions”文件来完成。您基本上可以使用此方法将默认的 httpd 文件替换为您自己的自定义文件。

    http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 2016-11-17
      • 2015-06-13
      • 1970-01-01
      • 1970-01-01
      • 2017-06-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-12
      相关资源
      最近更新 更多