I'm getting 504 errors from my elastic beanstalk application. I believe that the requests on the backend are taking too long and the loadbalancer is returning a 504 to the client. I tried up'ing the idle timeout from 60 seconds to 120 seconds on the load balancer, but it still seems to be timing out after 60 seconds. Is there anything else I need to do in order for that to take effect, or is it just a matter of time?
Asked
Active
Viewed 2,399 times
0
-
can you attach a screen shot of your elb configuration ? – Amit Jan 04 '18 at 15:53
-
what all do you want to see? – brendonparker Jan 04 '18 at 15:58
-
I've attached a picture – brendonparker Jan 04 '18 at 16:01
-
I think I may have determined from the ELB logs that the 504 is coming from the server, not the load balancer. Continuing to investigate... – brendonparker Jan 04 '18 at 16:18
-
nice , good luck with your debugging :) – Amit Jan 04 '18 at 16:48
-
@AmitKhandelwal thanks for assist. I figured out my issue and posted the answer below. – brendonparker Jan 04 '18 at 19:58
1 Answers
0
Ok, so I figured out the issue. While this doesn't exactly answer my original question (how long it takes until ELB timeout changes take effect), it did fix the issue I was experiencing.
Basically, you need to configure the nginx proxy to up the timeouts:
https://stackoverflow.com/a/47169533/2460073
Side note - the logs from the loadbalancer were helpful to show that both the BackendStatusCode
and ElbStatusCode
where 504. This revealed that was in fact the application server returning a 504
.

brendonparker
- 838
- 8
- 19
-
2Also, checking the response headers is usually very valuable. Seeing `Server: nginx` would rule out the balancer as throwing the error. – Michael - sqlbot Jan 04 '18 at 23:27
-
Doesn't necessarily rule out the balancer as throwing the error. I've seen `502 Bad Gateway` coming from the balancer when the back end server closes the connection, but doesn't send any response headers/bytes. (In this case it was a bug in the nodejs app, but nonetheless). – brendonparker Jan 05 '18 at 13:38
-
If the server doesn't send any response headers, the balancer wouldn't set `Server: nginx` in the response. – Michael - sqlbot Jan 05 '18 at 19:14
-
1