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회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠