I have a service that is deployed to Amazon Web Services (AWS), in particular 2 instances behind an elastic load balancer (ELB). Availability zones are selected as all three us-west-2a, b, c but only 2 of the above 3 zones have instances running in it.
The problems are that even though the traffic / load is not too high, I still often get HTTP 504 errors from ELB.
Journal lines read as follows
-1 -1 -1 504 0 0 0
In order, --request_processing_time --backend_processing_time --response_processing_time --elb_status_code --backend_status_code --received_bytes --sent_bytes. A description of how each field and response tool can be found here.
ELB timeout is 60 seconds. KeepAlive - 'On' for backend instances. Request delay from ELB is under control. I tried increasing KeepAliveTimeout , but to no avail.
Does anyone have an idea of ββhow to proceed? I donβt even know the cause of this problem.
PS: More like the second question, there are several cases (much less than 504 returned by ELB when the backend does not even accept the request), where even the backend returns 504, and then ELB sends the same to the client. As far as I know, HTTP 504 should be returned by the proxy only when the backend is disconnected. How can the server itself return 504?
source share