Help Center/ Elastic Load Balance/ FAQs/ Service Abnormality/ How Can I Handle Abnormal Status Codes?
Updated on 2024-09-24 GMT+08:00

How Can I Handle Abnormal Status Codes?

Common abnormal status codes include 400, 403, 502, 504, and more. If any of these codes is returned, it is recommended that you access the backend server to check if it can respond properly.

If the backend server responds properly, rectify the fault by referring to Table 1. If the fault persists, contact the customer service.

Table 1 Common abnormal status codes

Status Code

Description

Possible Causes

400

Bad Request

  • The client sent a malformed request that does not comply with the HTTP specification.
  • An HTTP request was sent to the HTTPS port.
  • The size of the request header exceeded 64 KB.

401

Unauthorized

Authentication on the backend server failed. (This status code is returned to the client by the backend server.)

403

Forbidden

The request was intercepted by the backend server. (This status code is returned to the client by the backend server.)

404

Not Found

  • The backend server is abnormal or the application does not exist. (This status code is returned to the client by the backend server.)
  • The forwarding policy was incorrectly configured, and the request was not routed to the right backend server.

408

Request Timeout

The client did not send the request within the time that the server was configured to wait, which is 60s by default. Sending a TCP keepalive packet does not prevent this timeout.

413

Payload Too Large

The size of the request body sent by the client exceeded 10 GB.

414

Too long URI

The request URL or query string parameter sent by the client was too long.

499

Client Closed Request

The client disconnected from the load balancer before receiving a response from the load balancer. This status code is recorded only in access logs.

500

Internal Server Error

There was an internal error. (This status code is returned to the client by the backend server.)

501

Not Implemented

The load balancer failed to identify the request.

The value of the Transfer-Encoding header field is not chunked or identity.

502

Bad Gateway

  • The port used by the backend server was incorrectly configured.
  • The load balancer received a TCP RST packet from the backend server when attempting to establish a connection with or sending data to the backend server.
  • The format of the response from the backend server was incorrect, or the response contained an invalid HTTP response header.
  • The backend server was incorrectly configured, for example, incorrect routes or network ACLs.

503

Service Unavailable

The application or backend server was unavailable. Generally, this status code is returned by the backend server.

504

Gateway Timeout

  • During the first connection, the load balancer failed to connect to the backend server before the connection times out. (The default timeout is 5 seconds).
  • The load balancer established a connection with the backend server, but did not respond before the response timeout (which is 300s by default) elapsed.
  • The network ACL rules of the subnet did not allow the load balancer to access backend servers in the subnet.