HTTP status codes

Updated at:

This topic describes the 4xx and 5xx HTTP status codes returned by ESA and offers solutions for troubleshooting.

4xx status codes

4xx status codes indicate client-side errors.

400

  • Cause: Bad Request

  • Description: The request is malformed or invalid.

  • Explanation: The origin server cannot understand or process the client's request due to a syntax error.

  • Solution: Verify that the request parameters are valid and correctly formatted, and then retry.

401

  • Cause: Unauthorized

  • Description: The request requires user authentication.

  • Explanation: The client did not include valid authentication credentials in the request. The origin server requires authentication to process the request.

  • Solution: Include valid authentication credentials in the request or ensure the request is authorized on the origin server, and then retry.

403

  • Cause: Forbidden

  • Description: Forbidden.

  • Explanation: The origin server understood the request but refuses to fulfill it because the client lacks permission to access the requested resource.

  • Solution: Grant the required permissions for the client request, and then retry.

404

  • Cause: Not Found

  • Description: The requested resource does not exist.

  • Explanation: The origin server could not find the requested resource.

  • Solution: Correct the request URI and retry, or check if the server-side URL path is publicly accessible.

405

  • Cause: Method Not Allowed

  • Description: The HTTP method is not supported for this resource.

  • Explanation: The HTTP request method used by the client, such as GET, POST, or PUT, is not allowed for the target resource.

  • Solution: Change the request method to one that is supported by the origin server, and then retry.

406

  • Cause: Not Acceptable

  • Description: Not acceptable.

  • Explanation: The requested resource cannot be served in a format that conforms to the content negotiation headers specified by the client, such as Accept-Charset or Accept-Language.

  • Solution: Modify the request header fields to a type that is supported by the origin server, and then retry.

407

  • Cause: Proxy Authentication Required

  • Description: Proxy authentication required.

  • Explanation: The client did not provide the required authentication credentials to access the requested resource through a proxy origin server.

  • Solution: Check if the authentication for the proxy origin server has expired. Include the correct credentials issued by the proxy origin server, and then retry.

408

  • Cause: Request Timeout

  • Description: The server timed out waiting for the request.

  • Explanation: The origin server did not receive a complete request within a reasonable time and has closed the connection rather than continue waiting.

  • Solution: Increase the origin server's processing timeout or reduce the request payload size, then retry.

409

  • Cause: Conflict

  • Description: Conflict.

  • Explanation: The request could not be completed because it conflicts with the current state of the target resource. This error commonly occurs in response to a PUT request when multiple clients attempt to edit the same resource simultaneously.

  • Solution: Refresh and resubmit the information, or implement conflict resolution logic on the origin server, and then retry.

410

  • Cause: Gone

  • Description: The resource is permanently removed.

  • Explanation: The origin server uses this status code to inform the client that the requested resource has been intentionally and permanently deleted.

  • Solution: Remove any references to the permanently deleted resource from the client, and then retry.

411

  • Cause: Length Required

  • Description: Length required.

  • Explanation: The client did not specify the length of the request body in the Content-Length header, but this information is required to access the resource.

  • Solution: Include the Content-Length header in the client's request and retry. If the length cannot be determined, use the Transfer-Encoding: chunked header to enable chunked transfer encoding.

412

  • Cause: Precondition Failed

  • Description: One or more preconditions are not met.

  • Explanation: The origin server rejected the request because the resource does not meet the conditions specified by the client.

  • Solution: Include the correct precondition headers in the request, and then retry.

413

  • Cause: Payload Too Large

  • Description: The request payload exceeds the server’s size limit.

  • Explanation: The origin server refuses to process the request because the payload sent by the client exceeds the server's acceptable size limit.

  • Solution: Reduce the file upload size or the amount of submitted data, and then retry.

414

  • Cause: URI Too Long

  • Description: The request URI is too long.

  • Explanation: The origin server refuses to process the request because the URI provided by the client is too long.

  • Solution: Shorten the request URI, or split long parameters into multiple requests and aggregate the results on the client side.

415

  • Cause: Unsupported Media Type

  • Description: The media type of the payload is not supported.

  • Explanation: The origin server refuses to process the request because the format of the payload is not supported.

  • Solution: Modify the Content-Type header in the request to a format supported by the server, and then retry.

416

  • Cause: Range Not Satisfiable

  • Description: The requested range is not satisfiable.

  • Explanation: The origin server cannot fulfill the requested range specified in the Range header of the client request.

  • Solution: Check that the Range header field specifies a valid range. Modify the Range value and retry.

417

  • Cause: Expectation Failed

  • Description: Expectation failed.

  • Explanation: The origin server cannot meet the requirements specified in the Expect header of the client request.

  • Solution: This is common in testing scenarios. If it occurs in production traffic, disable the Expect header in the request.

418

  • Cause: Non-standard status code

  • Description: Status code not returned by ESA

  • Explanation: ESA does not actively return status code 418. If you receive a 418 error for a resource accelerated by ESA, the status code was likely returned by your origin server or an intermediate proxy. This is often due to anti-crawler or rate-limiting policies configured on the origin server. Download tools that support resumable downloads, such as aria2, may also trigger this non-standard response code if connections are interrupted.

  • Solution:

    1. Inspect the response headers of the failed request to identify which node returned the 418 status code (the ESA node or the origin server).

    2. Check whether the origin server has anti-crawler or rate-limiting policies enabled, and confirm whether the 418 code is actively returned by the origin server.

    3. If you use tools like aria2 to download large files, investigate connection interruptions in resumable download scenarios. Try reducing the number of concurrent connections or adjusting the chunk size.

429

  • Cause: Too Many Requests

  • Description: Too many requests.

  • Explanation: The client has sent too many requests in a given period, as defined by the origin server's rate-limiting rules.

  • Solution: The number of requests has exceeded the origin server's limit. Wait for a period of time before retrying, based on the retry interval configured on the origin server.

498

  • Cause: Blocked for Security Throttling

  • Description: Request blocked by security rate-limiting.

  • Explanation: When the traffic load on an ESA node is high, the edge WAF component may not be able to process requests in time, triggering the strong security mode policy. To prevent the security inspection module from being bypassed, the system forcibly blocks the request and returns this status code.

  • Solution:

    1. Check service traffic: Determine if there is a sudden traffic spike or if you are experiencing a volumetric attack.

    2. Adjust security policy: If your service requires the highest level of security and can tolerate some packet loss, keep "strong security mode" enabled. If you need to prioritize business continuity, contact Alibaba Cloud technical support to switch the edge WAF configuration back to the default "Bypass" mode. In Bypass mode, requests pass directly to the origin server when the WAF is overloaded, ensuring service availability.

Note

Status code 498 is an extension used by ESA to specifically indicate that a request was blocked by the edge security module (WAF) due to an overload in strong security mode. This status code is not part of the standard HTTP protocol.

499

  • Cause: Client Close Request

  • Description: The client closed the connection before the server could respond.

  • Explanation: This error occurs when the client terminates the connection before the origin server can respond. Since the client actively closed the request, it does not receive an error response, so defining a custom error page is unnecessary.

5xx status codes

Note

Status codes from 520 to 599 are used by ESA to provide more granular error details. To avoid confusion, we recommend that you do not use status codes in this range in your applications.

500

  • Cause: Internal Server Error

  • Description: An unexpected condition occurred on the origin server.

  • Explanation: A problem on your origin server prevented it from fulfilling the request.

  • Solution: Check the origin server logs to identify the specific error and resolve it. Alternatively, you can roll back to a previous stable version to quickly restore service.

502

  • Cause: Bad Gateway

  • Description: The gateway received an invalid response from an upstream server.

  • Explanation: An ESA node, while acting as a gateway, received an invalid response from your origin server.

  • Solution: Confirm that the origin server is available and running correctly. Then, check that the origin server's firewall rules allow traffic from ESA nodes.

503

  • Cause: Service Temporarily Unavailable

  • Description: The origin server is temporarily unable to handle the request.

  • Explanation: Your origin server is overloaded or down for maintenance.

  • Solution: Check the origin server's load. Identify high-load application processes and use relevant tools to investigate and resolve the cause of the high load.

504

  • Cause: Gateway Timeout

  • Description: The gateway did not receive a timely response.

  • Explanation: An ESA node, while acting as a gateway, did not receive a timely response from your origin server.

  • Solution: Verify that the origin server is available and responsive, or consider increasing the origin request timeout.

508

  • Cause: Loop Detected

  • Description: The server detected an infinite loop.

  • Explanation: The request received by the ESA node has exceeded the maximum number of times it can loop through the ESA network.

  • Solution: Check for loops on the origin server. Ensure that any loops have a termination condition and can finish normally, and then retry.

520

  • Cause: Unknown origin error

  • Description: The origin server returned an unknown error.

  • Explanation: The origin server returned an empty, unknown, or unexpected response to the ESA node.

  • Solution: Check the origin server logs. This error is commonly caused by application crashes or database connection errors.

521

  • Cause: Web server is down

  • Description: The origin server is offline.

  • Explanation: The origin server refused the connection from the ESA node.

  • Solution: Check if the origin server is available. If it is, investigate whether the IP address of the ESA node is on the origin server's whitelist.

522

  • Cause: Connection timed out

  • Description: The connection timed out.

  • Explanation: The connection between the ESA node and the origin server timed out.

  • Solution: Check if the IP address of the ESA node is being rate-limited or blocked by the origin server. Confirm that your origin server allows IP addresses of ESA nodes.

523

  • Cause: Origin is unreachable

  • Description: The origin server is unreachable.

  • Explanation: The ESA node cannot connect to your origin server.

  • Solution: Confirm that the origin server's IP address has been correctly added in the ESA DNS settings. Test for any network or routing issues between ESA and the origin server.

524

  • Cause: A timeout occurred

  • Description: A timeout occurred.

  • Explanation: The ESA node successfully connected to the origin server, but the origin server did not provide an HTTP response within the configured origin request timeout (default: 30 seconds).

  • Solution:

    1. Troubleshoot origin server response speed: Use the Network tab in your browser's Developer Tools to inspect the request's Timing information and confirm if the origin server's processing time exceeds the timeout threshold. You can also bypass ESA and access the origin server directly to compare response times.

    2. Adjust the origin request timeout: In the ESA console, configure the origin request timeout. The value can range from 1 to 300 seconds.

    3. Optimize origin server performance: Check the origin server load and the processing efficiency of your backend services to reduce response latency.

525

  • Cause: SSL handshake failed

  • Description: SSL handshake failed.

  • Explanation: The SSL handshake between the ESA node and the origin server failed.

  • Solution: Configure a valid SSL certificate and ensure it uses a cipher suite that is supported by ESA, and then retry. For a list of cipher suites supported by ESA, see TLS cipher suites and protocol versions.

526

  • Cause: Invalid SSL certificate

  • Description: Invalid SSL certificate.

  • Explanation: The ESA node could not validate the SSL certificate on your origin server, which prevented a secure connection from being established.

  • Solution: Update or replace the SSL certificate, and then retry.

530

  • Cause: Unable to resolve the origin hostname

  • Description: The origin hostname could not be resolved.

  • Explanation: The ESA node could not resolve the origin server's hostname, which prevented it from establishing a connection with the origin server.

  • Solution: Ensure that the origin server's hostname can be resolved correctly, and then retry.

581

  • Cause: Maximum Execution Hop Count Exceeded

  • Description: Edge function execution exceeded the maximum allowed hops.

  • Explanation: A recursive edge function invocation exceeded the maximum hop count, which blocked the request.

  • Solution: Modify your edge function code to prevent recursive invocations.

582

  • Cause: Version retrieval failed

  • Description: Failed to retrieve version.

  • Explanation: Failed to retrieve the edge function version information.

  • Solution: Republish the edge function script, and then retry.

583

  • Cause: Rate limit

  • Description: Rate limit triggered.

  • Explanation: The processing limit for the edge function was exceeded, which triggered traffic limiting.

  • Solution: Contact us for assistance.

584

  • Cause: Insufficient computing resources

  • Description: Insufficient computing resources.

  • Explanation: The ESA node has insufficient computing resources.

  • Solution: Contact us for assistance.

594

  • Cause: uncaught exception

  • Description: An unhandled exception occurred.

  • Explanation: The edge function script stalled due to an uncaught exception.

  • Solution: Add exception handling to your edge function script, and then retry.

595

  • Cause: Execution Time Limit Exceeded

  • Description: Script execution time exceeded the maximum allowed duration.

  • Explanation: The edge function script ran longer than the maximum allowed time (default: 120 seconds).

  • Solution: Optimize the script to complete execution within 120 seconds, and then retry.

596

  • Cause: Configuration pull failed

  • Description: Failed to pull configuration.

  • Explanation: Failed to pull the edge function configuration.

  • Solution: Redeploy the edge function configuration from the console. If the issue persists, Contact us for assistance.

598

  • Cause: Debugger exception

  • Description: Debugger exception.

  • Explanation: The edge function debugger encountered an exception.

  • Solution: Verify that code has been uploaded or a debugger session has been created, and then retry.

599

  • Cause: Script execution exception

  • Description: Script execution exception.

  • Explanation: The edge function script encountered an execution error or exceeded its resource limits.

  • Solution: Check the edge function script for syntax errors and ensure that its format is correct.