508 Loop Detected

The server found an infinite loop while processing.

When to use it

WebDAV, or a redirect or proxy cycle.

Common causes and fixes

508 comes from WebDAV (RFC 5842): the server found an infinite loop while processing a request with Depth: infinity, typically because bindings make a collection contain itself. Outside WebDAV it is rare, with one big exception: on cPanel shared hosting with CloudLinux, “508 Resource Limit Is Reached” means your account hit its CPU, memory or process limit.

Proxies may use 508 or similar errors for request loops: nginx proxy_pass pointing back at its own server name, or a CDN whose origin is set to the CDN hostname. Check proxy targets and look for Via or CDN-Loop headers repeating. In the shared hosting case, find the heavy scripts or aggressive bots in the access log and fix them, or move to a larger plan.

Server error (5xx)

5xx codes are server errors: the request may be fine, but the server or something behind it failed. These are worth alerting on.

What it looks like

HTTP/1.1 508 Loop Detected

How to send it

Node.js / Expressres.status(508).end()
Python / Flaskreturn '', 508
nginxreturn 508;

How to check it

curl -s -o /dev/null -w "%{http_code}\n" https://example.com/

Open HTTP Status Codes