Troubleshooting HTTP 5xx errors

HTTP 5xx codes can be caused by an error on Origin-server or CDN-edges.

Check Incidents or Planned Maintenances

Check the origin-source 

Check settings of your CDN-resource

Check Incidents or Planned Maintenances

If you have noticed a significant increase of 5xx codes or received multiple complaints from users, we recommend you to go to the Status Page and check if  there are Incidents or Planned Maintenances connected with the following services opened:

- CDN-service;

other G-Core Labs services (if you use as an origin-source one of them: StorageVPSDedicated ServerCloud).

 

Check the origin-source 

Make sure that your origin-server is available.

If the origin doesn’t respond or gets responses with HTTP errorcontact your hosting provider or server’s administrator to solve this issue.

  • HTTP 504 error usually appears when the origin can’t respond to CDN in time: CDN-edge waits the response from origin-server for 5 seconds and sends code 504 if there is no responseSet up your origin to make it possible to respond in time. 
  • If you restrict access to your origin by IP or use DDoS Protection servicemake sure that you’ve added the list of CDN-edges IP to the whitelistUse API-request below to receive the list of IP: 
curl -i -X GET https://api.gcdn.co/public-ip-list 

!We constantly update this list and recommend you either create a script to update the whitelist on the origin regularly or use HTTP-header authorizationTo know more about ACL set upread the article.

 

Check settings of your CDN-resource 

HTTP 5xx errors can be caused by incorrect CDN-resource's settingsCheck the list of the most common errors below.

 

Incorrect Origin Pull Protocol 

Check what Origin Pull Protocol you have chosen in the resource’s settings and make sure that the origin-source works with this protocol. You may find more information about this feature in the article.

If you use Cloudflare or Cloudfront services as an origin-source, choose HTTP as the Origin Pull Protocol. If the origin works only with HTTPS or there is a redirect from HTTP to HTTPS, contact our Technical Support (support@gcorelabs.com) to add settings. 

 

Incorrect Host Header

Check the Change Host Header option. Make sure that the option is active and the value is the same as the Origin Source or match with the host that you have set up on the Origin. You may find more information about Host Header here

To track the amount of 5xx errors use the Response codes statistic on the Report tab.

You can receive detailed data about error responses using Raw logs paid featureCheck the article to know more about Raw logs receiving set up and logs fields specifications 
 

Was this article helpful?
Recently viewed articles