【问题标题】:How can I increase timeouts of AWS worker tier instances?如何增加 AWS 工作人员层实例的超时时间?
【发布时间】:2017-04-28 07:29:10
【问题描述】:

我正在尝试在 Docker 容器中的 Elastic Beanstalk 单个工作器实例上运行后台进程,并且无法在超过 60 秒的时间内执行请求/作业而没有出现 504 超时。

查看 AWS 提供的日志文件,问题从以下错误开始;

[error] 2567#0: *37 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: , request: "POST /queue/work HTTP/1.1", upstream: "http://172.17.0.3:80/queue/", host: "localhost"

有谁知道是否可以将限制从 60 秒增加到更长的时间,因为我想生成一些需要 3 到 4 分钟来处理的报告。

我在 .ebextensions/nginx-timeout.config 中增加了 NGINX 超时设置,但没有任何结果。

files:
  "/etc/nginx/sites-available/elasticbeanstalk-nginx-docker-proxy-timeout.conf":     mode: "000644"
    owner: root
    group: root
    content: |
      proxy_connect_timeout       600;
      proxy_send_timeout          600;
      proxy_read_timeout          600;
      send_timeout                600;
commands:
  "00nginx-create-proxy-timeout":
    command: "if [[ ! -h /etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy-timeout.conf ]] ; then ln -s /etc/nginx/sites-available/elasticbeanstalk-nginx-docker-proxy-timeout.conf /etc/nginx/sites-enabled/elasticbeanstalk-nginx-docker-proxy-timeout.conf ; fi"

我还增加了自定义 php.ini 中的 PHP max_execution_time

max_execution_time = 600

任何帮助将不胜感激。

【问题讨论】:

  • 你找到解决办法了吗?

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


【解决方案1】:

也许检查负载均衡器的空闲超时设置。默认值为 60 秒。 https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html?icmpid=docs_elb_console

【讨论】:

    猜你喜欢
    • 2020-07-16
    • 2014-12-31
    • 1970-01-01
    • 2020-12-23
    • 2019-07-11
    • 1970-01-01
    • 1970-01-01
    • 2014-10-22
    • 1970-01-01
    相关资源
    最近更新 更多