HTTP ERROR 408 - After setting up kubernetes , along with AWS ELB and NGINX Ingress

4/23/2020

I am finding it extremely hard to debug this issue, I have a Kubernetes cluster setup along with services for the pods, they are connected to the Nginx ingress and connected to was elb classic, which also connects to the AWS route53 DNS my domain name is connected to. Everything works fine with that, but then am facing an issue where my domains do not behave the way I would like them to.

My domains in the Nginx-ingress-rules are connected to a service which sends alive page when hit with a domain, now when I do that I get this page.

Please help me what what to do to resolve this quickly, thanks in advance! Talk to you soon

enter image description here

-- Henry Asante
amazon-web-services
kubernetes
nginx

1 Answer

4/24/2020

While you are using web servers behind ELB you must know that they generate a lot of 408 responses due to their health checks.

Possible solutions:

1. Set RequestReadTimeout header=0 body=0

This disables the 408 responses if a request times out.

2. Disable logging for the ELB IP addresses with:

SetEnvIf Remote_Addr "10\.0\.0\.5" exclude_from_log
CustomLog logs/access_log common env=!exclude_from_log

3. Set up different port for ELB health check.

4. Adjust your request timeout higher than 60.

5. Make sure that the idle time configured on the Elastic Loadbalancer is slightly lower than the idle timeout configured for the Apache httpd running on each of the instances.

Take a look: amazon-aws-http-408, haproxy-elb, 408-http-elb.

-- MaggieO
Source: StackOverflow