504 网关超时 - ELB、Nginx、Gunicorn

504 网关超时 - ELB、Nginx、Gunicorn

大家好。我无法下载长期运行的报告。该网站使用 ELB、nginx 和 gunicorn 作为后端服务器。在 nginx 中,我配置了以下设置:

proxy_connect_timeout 600s;
proxy_send_timeout 600s
; proxy_read_timeout
600s; send_timeout 600s
;
fastcgi_connect_timeout 600s; fastcgi_send_timeout 600s;
fastcgi_read_timeout 600s;

在 ELB 中,我将空闲超时配置为 600 秒。

我启动了 Gunicorn,超时时间为 600 秒。

你知道为什么我会收到 504 网关超时错误吗?

以下是来自ELB的一段日志:

h2 2020-08-31T18:30:38.619550Z app/ELBNAME/ef76928f240170a7 ip:58854 172.30.1.7:80 0.000 60.013 0.000 504 504 1906 1128 “POST 域/管理员/报告/条带交易报告 HTTP/2.0” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,如 Gecko) Chrome/81.0.4044.138 Safari/537.36” ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 arn:aws:elasticloadbalancing:us-east-1 :: targetgroup/ELBNAME/9405a9cc2732dfb2“Root = 1-”“域”“会话重用”0 2020-08-31T18:29:38.605000Z“转发”“-”“-”“172.30.1.7:80”“504”“-”“-”

不确定如何解释它...

相关内容