*25 从上游读取响应标头时上游过早关闭连接。烧瓶 + AWS 弹性负载均衡

发布于 2025-01-12 12:27:09 字数 650 浏览 0 评论 0原文

我正在使用 AWS ELB 部署 Flask 后端 api。我有一个上传文件的端点和另一个从文件读取数据的端点。

其他每个端点都工作正常,但当我运行读取数据的端点时,上传的文件会运行大约 30 秒,并抛出 502 bad gateway 错误。

ELB错误:2022/03/08 17:30:19 [错误] 25807#25807:*25上游在从上游读取响应标头时过早关闭连接,客户端:172.31.0.71,

.platforms/nginx/conf.d/myconfig。 conf:

keepalive_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_send_timeout 3600s;
proxy_read_timeout 3600s;
fastcgi_send_timeout 3600s;
fastcgi_read_timeout 3600s;
client_header_timeout 3600s;
client_body_timeout 3600s;
send_timeout 3600s;
uwsgi_read_timeout 3600s;
uwsgi_send_timeout 3600s;
uwsgi_socket_keepalive on;

我尝试了很多答案,但没有一个对我有用。请我需要帮助

I'm using AWS ELB to deploy flask backend api. I have an endpoint that uploads a file and another endpoint that reads data from the file.

Every other endpoint works fine but when I run the endpoint that reads data the file that was uploaded it runs for about 30 seconds and it throws the 502 bad gateway error.

ELB error: 2022/03/08 17:30:19 [error] 25807#25807: *25 upstream prematurely closed connection while reading response header from upstream, client: 172.31.0.71,

.platforms/nginx/conf.d/myconfig.conf:

keepalive_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_send_timeout 3600s;
proxy_read_timeout 3600s;
fastcgi_send_timeout 3600s;
fastcgi_read_timeout 3600s;
client_header_timeout 3600s;
client_body_timeout 3600s;
send_timeout 3600s;
uwsgi_read_timeout 3600s;
uwsgi_send_timeout 3600s;
uwsgi_socket_keepalive on;

I have tried a whole lot of answers but none has worked for me. Please I need help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文