HTTP 5xx codes can be caused by an error on Origin-server or CDN-edges.
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:
- other G-Core Labs services (if you use as an origin-source one of them: Storage, VPS, Dedicated Server, Cloud).
Check the origin-source
Make sure that your origin-server is available.
If the origin doesn’t respond or gets responses with HTTP error, contact 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 response. Set up your origin to make it possible to respond in time.
- If you restrict access to your origin by IP or use DDoS Protection service, make sure that you’ve added the list of CDN-edges IP to the whitelist. Use API-request below to receive the list of IP:
curl -i -X GET https://api.gcorelabs.com/cdn/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 authorization. To know more about ACL set up, read the article.
Check settings of your CDN-resource
HTTP 5xx errors can be caused by incorrect CDN-resource's settings. Check 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 (email@example.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 feature. Check the article to know more about Raw logs receiving set up and logs’ fields specifications.