gpt4 book ai didi

amazon-web-services - AWS - 如何设置 HTTP 502 超时?

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:24:38 24 4
gpt4 key购买 nike

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

enter image description here

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

enter image description here

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

enter image description here

如何修复它,即使请求花费的时间超过 60 秒,我也不会收到 HTTP 500 错误?

任何建议表示赞赏。谢谢。

最佳答案

我怀疑根本不是elastic load balancer,而是驻留在elastic beanstalk环境容器中的HTTP server。

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

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

关于amazon-web-services - AWS - 如何设置 HTTP 502 超时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45421288/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com