Why do I receive an HTTP 5xx error when I connect to web servers that run on EC2 instances that are configured to use Classic Load Balancing?
3 minute read
0
I received an HTTP 502, 503, or 504 errors when I tried to connect to web servers. The web servers run on EC2 instances that are configured to use Classic Load Balancing.
The surge queue is full. Review the SpilloverCount metric to check that your instances have the capacity to handle the request rate.
There are no healthy instances. Make sure that you have healthy instances in every Availability Zone that your load balancer responds. To do this, review the HealthyHostCount metric. For more information, see Troubleshoot a Classic Load Balancer: health checks.
You didn't register at least one instance in every Availability Zone that your load balancer responds in. If you can't confirm that an instance is registered in each Availability Zone, then turn on cross-zone load balancing.
Connection draining isn't turned on for the Classic Load Balancer that your web server instances are registered with.
Web server instances or backend application server instances terminate connections before the load balancer does. This results in premature connection terminations.
Web server instances or backend application server instances crash or restart server processes when requests are in flight. This results in the server breaking all connections.
Apache web server instances have the AcceptFilter http/https option turned on. This instructs Apache to implement TCP_DEFER_ACCEPT on the connections.