Elastic Beanstalk drops connections to load balancer during deployment after Amazon Linux 2 upgrade

0

Hi. I just upgraded my Elastic Beanstalk environment from "PHP 7.3 running on 64bit Amazon Linux/2.9.28" to "PHP 7.3 running on 64bit Amazon Linux 2/3.3.12" (using Apache) and found that my application load balancer returns 502 errors for a few seconds every single time I deploy a new application version.

I checked the ALB logs and found the 502 responses have a target_processing_time of -1 which the documentation says means that "the load balancer can't dispatch the request to a target. This can happen if the target closes the connection before the idle timeout or if the client sends a malformed request."

I ran a test where I sent one request per second to both the ALB and directly to the EC2 instance during deployment. I found that during those 2-3 seconds where the application version is switching over, the requests to the ALB return 502 while the requests directly to the instance just have a brief pause but respond correctly anyway.

Everything I've been able to find on this topic says it's related to KeepAlive timeouts and needing different timeouts on the server and ALB but I've tried every combination of timeouts I can imagine and no luck. I've tried a few different environment platforms and it happens 100% of the time on the Amazon Linux 2 platforms and 0% of the time on Amazon Linux 1 platforms.

Thanks!

benp
已提問 2 年前檢視次數 72 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南