【发布时间】:2020-10-25 23:00:20
【问题描述】:
我有一个flask 应用程序,我正在使用弹性beantalk 进行部署。在我的env.yaml 中,我有:
...
aws:autoscaling:updatepolicy:rollingupdate:
RollingUpdateType: Health
Timeout: PT30M
...
aws:elasticbeanstalk:command:
BatchSize: "30"
BatchSizeType: Percentage
Timeout: 2000
但是当我的应用启动时(使用application.py),我得到一个错误:
[CRITICAL] WORKER TIMEOUT (pid:11232)
[11232] [INFO] Worker exiting (pid: 11232)
[11324] [INFO] Booting worker with pid: 11324
我可以做些什么来增加超时?我尝试通过以下方式设置01.nginx.timeout.config:
files:
"/etc/nginx/conf.d/01.nginx.timeout.conf":
mode: "000644"
owner: root
group: root
content: |
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
fastcgi_send_timeout 600s;
fastcgi_read_timeout 600s;
container_commands:
nginx_reload:
command: "sudo service nginx reload"
但这给出了一个关于 ngnix reload 失败的错误。
我能做什么?
【问题讨论】:
-
不应该是
sudo systemctl restart nginx吗? -
是的 - 做到了。如果您作为答案发布,我可以接受。
-
谢谢,很高兴听到。添加答案:-)
标签: amazon-web-services nginx amazon-elastic-beanstalk