Elastic Beanstalk Worker's SQS daemon getting 504 gateway timeout after 1 minute

前端 未结 1 805
执笔经年
执笔经年 2020-12-29 00:48

I have an Elastic Beanstalk worker that can only run one task at a time and it takes some time to do so (from a few minutes to, hopefully, less than 30 minutes), so I\'m que

相关标签:
1条回答
  • 2020-12-29 01:38

    Since I had the time to investigate this a little better, the solution is to add an ebextension that configures the proxy timeout settings:

    files:
        "/etc/nginx/sites-available/elasticbeanstalk-nginx-docker-proxy-timeout.conf":
            mode: "000644"
            owner: root
            group: root
            content: |
                proxy_connect_timeout       3600;
                proxy_send_timeout          3600;
                proxy_read_timeout          3600;
                send_timeout                3600;
    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"
    

    Source: http://cloudavail.com/2015/10/18/allowing-long-idle-timeouts-when-using-aws-elasticbeanstalk-and-docker/

    0 讨论(0)
提交回复
热议问题