Bobcares

Load Balancer 504 Gateway Timeout | Resolved

Load Balancer 504 Gateway Timeout may impact our online experience. As part of our Server Management Service, Bobcares offer solutions to your server issues.

Load Balancer 504 Gateway Timeout

Load Balancer 504 Gateway Timeout is an HTTP error that indicates a connection was closed by the load balancer because a request did not finish within the idle timeout period. The possible reasons for this error include:

  1. A target application takes more time than the default idle timeout to respond.
  2. Elastic Load Balancing connection is cut off for registered instances.
  3. The load balancer fails to establish a connection to the target before the connection timeout expired.
  4. Traffic from the target to the load balancer nodes on the ephemeral ports was blocked by the network ACL for the subnet (1024-65535).
  5. A Content-Length header value that is greater than the entity body is returned by the target. While it was awaiting the byte gaps, the load balancer ran out of time.
  6. The target is an AWS Lambda function, and the Support team service was unavailable when the connection timed out.

How To Fix The Load Balancer 504 Gateway Timeout Error?

Our Support team provides some easy methods to fix this error.

Method 1: Examine the load balancer’s idle timeout and make any necessary adjustments.

If the backend instance didn’t respond to the request within the configured idle timeout period, it also results in the load balancer HTTP 504 error. The Application Load Balancer’s idle timeout is set by default to 60 seconds.

Modify the load balancer’s idle timeout so that the HTTP request finishes within the allotted time. Alternately, speed up the application’s response to the HTTP request. Verify that the application responds within the configured idle timeout.

Method 2: Confirm that the load balancer allows traffic with registered targets.

Verify that traffic from one another in both directions is permitted on the traffic and health check ports by the network security groups connected to the load balancer and the backend targets. Verify that the network ACL for the subnet allows traffic from the targets to the load balancer nodes on the ephemeral ports (1024-65535).

Method 3: Before the connection timeout expiring, ensure that the Lambda function responds.

Check the performance metric duration with max statistics to confirm how much time is spent processing an event if the target is a Lambda function.

Method 4: Enable keep-alive settings on the EC2 instances in case of Elastic load balancing.

If Registered instances closing the connection to Elastic Load Balancing leads to the error, then enable keep-alive settings on the EC2 instances and make sure that the keep-alive timeout is greater than the idle timeout settings of the load balancer.

[Looking for a solution to another query? We are just a click away.]

Conclusion

Load Balancer 504 Gateway Timeout is a common HTTP error that can degrade a user’s online experience. To summarize, our Support team offers a few quick fixes to the error to stop it.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF