NginX issues HTTP 499 error after 60 seconds despite config. (PHP and AWS)

前端 未结 5 1165
面向向阳花
面向向阳花 2020-12-02 10:42

At the end of last week I noticed a problem on one of my medium AWS instances where Nginx always returns a HTTP 499 response if a request takes more than 60 seconds. The pa

5条回答
  •  Happy的楠姐
    2020-12-02 11:06

    The cause of the problem is the Elastic Load Balancers on AWS. They, by default, timeout after 60 seconds of inactivity which is what was causing the problem.

    So it wasn't NginX, PHP-FPM or PHP but the load balancer.

    To fix this, simply go into the ELB "Description" tab, scroll to the bottom, and click the "(Edit)" link beside the value that says "Idle Timeout: 60 seconds"

提交回复
热议问题