0

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?

enter image description here

brendonparker
  • 838
  • 8
  • 19

1 Answers1

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
  • 2
    Also, 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
    Oh - I see what you're saying now. Thanks for that tidbit! – brendonparker Jan 05 '18 at 21:19