Elastic Beanstalk:504网关超时-访问端点时下载图像

时间:2020-10-13 07:03:03

标签: amazon-web-services docker amazon-elastic-beanstalk

我是Elastic Beanstalk的新手,并且正在将机器学习模型作为API部署在AWS上。我可以将Docker映像部署到Elastic Beanstalk,但是,当我命中端点时,会出现以下错误:

----------------------------------------
/var/log/nginx/error.log
----------------------------------------
2020/10/13 06:43:41 [error] 4588#0: *48 upstream timed out (110: Connection timed out) while `reading response header from upstream, client: X.X.X.X, server: , request: "GET /api HTTP/1.1", upstream: "http://X.Z.X.X:5000/api", host: "myhost.elasticbeanstalk.com"`

当端点被击中时,它似乎正在下载大图像,然后由于超时而停止在82%处:

downloading:  76%|#######6  | 285373440/374434792 [00:30<00:09, 9671567.85B/s]
downloading:  77%|#######6  | 286946304/374434792 [00:30<00:09, 9672961.77B/s]
downloading:  77%|#######7  | 288519168/374434792 [00:31<00:08, 9675716.99B/s]
downloading:  77%|#######7  | 290075648/374434792 [00:31<00:08, 9648885.55B/s]
downloading:  78%|#######7  | 291648512/374434792 [00:31<00:08, 9657378.00B/s]
downloading:  78%|#######8  | 293221376/374434792 [00:31<00:08, 9658259.80B/s]
downloading:  79%|#######8  | 294794240/374434792 [00:31<00:08, 9668126.20B/s]
downloading:  79%|#######9  | 296367104/374434792 [00:31<00:08, 9634858.49B/s]
downloading:  80%|#######9  | 297939968/374434792 [00:32<00:07, 9647173.50B/s]
downloading:  80%|#######9  | 299512832/374434792 [00:32<00:07, 9658200.36B/s]
downloading:  80%|########  | 301069312/374434792 [00:32<00:07, 9632376.91B/s]
downloading:  81%|########  | 302642176/374434792 [00:32<00:07, 9644695.73B/s]
downloading:  81%|########1 | 304215040/374434792 [00:32<00:07, 9634090.57B/s]
downloading:  82%|########1 | 305787904/374434792 [00:32<00:07, 9647709.55B/s]
downloading:  82%|########2 | 307360768/374434792 [00:32<00:06, 96

这是API响应:

<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>

我该怎么办,以便在加载终端节点之前将这些Docker映像预加载到AWS Elastic Beanstalk上?

0 个答案:

没有答案