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
asked 2 years ago71 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions