We are using a NLB in AWS connected to our EKS cluster via a nginx ingress controller. Some of our requests get a random 504 gateway timeout.
We think we debugged the problem to our nginx ingress. Based on some Stackoverflow recommendations we played around with Connection headers.
- We set Connection "close" this had no effect
- We set Connection "keep-alive" again no effect
We also noticed another behavior with our proxy_read_timeout
when it was 60 seconds our request from the browser would be fulfilled at 60.xx seconds. When we reduced it to 30 it became 30.xx, 20 became 20.xx. We went to 1 but still get random 504 gateway timeouts and do not understand why proxy_read_timeout
has this behavior in our environment.
We want to understand what is the effect of proxy_read_timeout
and why do we get above behavior? Also is there a way to set Connection to "" on our nginx ingress (we are not able to do this via nginx.ingress.kubernetes.io/connection-proxy-header: ""
)
Thanks in advance!