This topic describes the 4xx and 5xx series status codes returned by ESA and provides solutions for these status codes to help you troubleshoot errors.
4XX status codes
4xx codes indicate client response errors.
400
Response message: Bad Request
Description: The status code indicates that the client sents a request to the server that could not be understood or processed due to issues with the request itself.
Solution: Check if the input parameters in the request are valid and try again.
401
Response message: Unauthorized
Description: This error indicates that the request was not sent with the proper authentication credentials. The server requires authentication to process the request.
Solution: Include valid authentication credentials or authorize the request on the origin server and try again.
403
Response message: Forbidden
Description: This error indicates that the client's request was understood by the server but cannot be fulfilled due to insufficient permissions to access the requested resource.
Solution: Grant the permissions for the client request and try again.
404
Response message: Not Found
Description: This error indicates that the origin server was unable to locate the requested resource.
Solution: Modify the request path and try again, or check whether the server URL path is accessible from the internet.
405
Response message: Method Not Allowed
Description: The status code indicates that the origin server recognizes the requested resource but does not support the HTTP method used in the request.
Solution: Adjust the request method to one supported by the origin server and try again.
406
Response message: Not Acceptable
Description: The status code indicates that the requested resource is not available in a format that adheres to the content negotiation headers specified by the client (for example,
Accept-CharsetorAccept-Language).Solution: Modify the request header fields to types supported by the origin server and try again.
407
Response message: Authentication Required
Description: The status code indicates that the client did not provide the necessary authentication credentials to access the requested resource through a proxy server.
Solution: Check whether the proxy origin server authentication has expired, include the correct credentials issued by the proxy origin server, and try again.
408
Response message: Request Timeout
Description: The status code indicates that the origin server did not receive the complete request within a reasonable time frame and does not wish to continue waiting for the connection.
Solution: Extend the origin server processing time or reduce the client request package size and try again.
409
Response message: Conflict
Description: The status code indicates that the request could not be completed due to a conflict with the current state of the target resource. This error can occur in responses of
PUTrequests when clients try to edit one resource.Solution: Refresh and resubmit the information, or add a conflict handling mechanism in the origin server and try again.
410
Response message: Gone
Description: When a resource is intentionally and permanently removed, servers use the 410 status code to inform clients that the resource is no longer available.
Solution: The client needs to remove references to the deleted resource and try again.
411
Response message: Length Required
Description: This status code indicates that the client did not specify the
Content-Lengthof the request body in the headers, and this information is required to obtain the resource.Solution: Include the
Content-Lengthfield in the client's request header and try again. If the length cannot be estimated, you can include theTransfer-Encoding: chunkedfield to define chunked transfer encoding.
412
Response message: Precondition Failed
Description: The status code indicates that the server denies the request because the resource does not meet the conditions specified by the client.
Solution: Include the valid preconditions in the request and try again.
413
Response message: Payload Too Large
Description: The status code indicates that the 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 submitted data size and try again.
414
Response message: URI Too Long
Description: The status code indicates that the server refuses to process the request because the URI provided by the client is excessively long.
Solution: Shorten the client request URI length or split long parameters into multiple processes and aggregate the results on the client side.
415
Response message: Unsupported Media Type
Description: The status code indicates that the server refuses to process the request because the format of the payload is not supported.
Solution: Modify the
Content-Typefield in the request header to a format supported by the server and try again.
416
Response message: Range Not Satisfiable
Description: The status code indicates that the server cannot fulfill the requested range specified in the Range header of the client's request.
Solution: Check whether the range in the
Rangerequest header field is valid, modify theRangeand try again.
417
Response message: Expectation Failed
Description: The status code indicates that the server could not meet the requirements specified in the
Expectheader of the client's request.Solution: This is common during testing. If it occurs in the production environment, disable the
Expectfield in the request header.
429
Response message: Too Many Requests
Description: The status code indicates that the client has sent too many requests in a specified amount of time, as determined by the server's rate-limiting rules.
Solution: The number of requests per unit time has exceeded the limit of the origin server. Try again after the retry interval set by the origin server.
499
Response message: Client Close Request
Description: The status code typically occurs when a client terminates the connection before the server is able to respond. The client won't receive the error page, so you don't need to define the page.
5XX status codes
Status codes between 520 and 599 are used by ESA. To avoid confusion, avoid using status codes in this range in your business.
500
Response message: Internal Server Error
Description: The status code indicates a problem with your origin web server, preventing it from fulfilling the request.
Solution: Check the origin server log to find and solve the error. You can also roll back to the previous working version for quick recovery.
502
Response message: Bad Gateway
Description: The status code indicates that ESA is unable to establish contact with your origin web server.
Solution: Determine whether the origin server is available, and then check whether the origin server firewall rules allow access from ESA points of presence (POPs).
503
Response message: Service Temporarily Unavailable
Description: The status code occurs when your origin web server is overloaded.
Solution: Check the origin server status, find the high-load application, troubleshoot and solve the high-load causes.
504
Response message: Gateway Timeout
Description: The status code indicates that ESA is unable to establish contact with your origin web server.
Solution: Check whether the origin server status is available or appropriately increase the timeout period.
508
Response message: Loop Detected
Description: This status code indicates that the request received by the ESA POP has exceeded the maximum number of times it can enter the ESA network in a loop.
Solution: Check the origin server loop, ensure the loop has termination conditions and can end normally, then try again.
520
Response message: Web server returns an unknown error
Description: This error occurs when the origin server returns an empty, unknown, or unexpected response to ESA.
Solution: Check the origin server logs. This is common with program crashes or database connection errors.
521
Response message: Web server is down
Description: This error occurs when the origin web server refuses connections from ESA.
Solution: Check whether the origin server is available. If it is, check whether the ESA POP is in the origin server's whitelist.
522
Response message: Connection timed out
Description: This error occurs when ESA times out contacting the origin web server.
Solution: Check whether the ESA POP IP address is rate-limited or blocked by the origin server. Confirm that your origin server allows ESA POP IP addresses.
523
Response message: Origin is unreachable
Description: This error occurs when ESA cannot contact your origin web server.
Solution: Confirm that the origin IP has been added to ESA DNS, and test network or routing between ESA and the origin server.
524
Response message: A timeout occurred
Description: This error usually indicates that ESA successfully connected to the origin web server, but the origin did not provide an HTTP response before the default Proxy Read Timeout.
Solution: Check whether the origin server is working under excessive load, and implement large HTTP process state polling to avoid this error.
525
Response message: SSL handshake failed
Description: This error indicates that the SSL handshake between ESA and the origin web server failed.
Solution: Configure the correct SSL certificate and ensure it matches the TLS cipher suites supported by ESA, then try again.
526
Response message: Invalid SSL certificate
Description: This indicates that ESA is unable to verify the SSL certificate on your origin server, preventing a secure connection from being established.
Solution: Update the SSL certificate and try again.
530
Response message: Unable to resolve the origin hostname
Description: This indicates that ESA is unable to resolve the origin hostname, preventing it from establishing a connection to the origin server.
Solution: Ensure that the origin server hostname can be resolved and try again.
581
Response message: Exceeding the maximum execution hop count
Description: In the Edge Function loop call scenario, it is intercepted after exceeding the maximum execution hop count.
Solution: Adjust your Edge Function code to avoid recursive invocation situations.
582
Response message: Version retrieval failed
Description: Failed to retrieve Edge Function version information.
Solution: Republish the Edge Function script and try again.
583
Response message: Rate limit
Description: the rate limit of Edge Function is triggered.
Solution: Please contact us for help.
584
Response message: Insufficient computing resources
Description: The computing resources of ESA POPs are insufficient.
Solution: Please contact us for help.
594
Response message: uncaught exception
Description: The Edge Function script got stuck due to uncaught exceptions.
Solution: Handle the corresponding exceptions in the Edge Function script and try again.
595
Response message: Execution time exceeds the limit
Description: The Edge Function script execution time exceeds the maximum time (default 120 seconds).
Solution: Optimize the script's CPU execution time to be within 120 seconds and try again.
596
Response message: Configuration pull failed
Description: Indicates that the Edge Function configuration pull failed.
Solution: Publish the configuration again through the console. If the error occurs again, contact us for help.
598
Response message: Debugger exception
Description: The Edge Function debugger has an exception.
Solution: Check whether the code has been uploaded or a debugger session has been created and try again.
599
Response message: Script execution exception
Description: The Edge Function script has execution errors or exceeds resource limits.
Solution: Check whether the script has syntax errors and whether the script format complies with the specifications.