Skip to content

508 Loop Detected

The server stopped a WebDAV request because it found an infinite loop, usually from bindings processed with Depth: infinity.

What 508 Loop Detected means

Defined in RFC 5842 (WebDAV bindings). A collection with a binding back to itself or a parent would loop forever under Depth: infinity, so the server ends the operation with 508.

Some shared hosts also show 508 Resource Limit Is Reached when an account uses too much CPU or memory. That is a hosting panel convention, not the RFC meaning.

Common causes

  • Bindings that create a cycle inside a WebDAV collection.
  • On shared hosting, an account going over its CPU, memory or process limits.

How to fix 508 Loop Detected

  1. Remove the binding that creates the cycle, or use a smaller Depth value.
  2. On shared hosting, check resource usage in the control panel, cut heavy plugins or scripts, or move to a bigger plan.

Example response

HTTP/1.1 508 Loop Detected
Content-Type: text/plain; charset=utf-8

508 Loop Detected

How to check for a 508 response

cURL

# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/

JavaScript (Node.js)

const res = await fetch("https://example.com/");
if (res.status === 508) {
  console.log(res.status, res.statusText);
}

Python

import requests

res = requests.get("https://example.com/")
if res.status_code == 508:
    print(res.status_code, res.reason)

Go

res, err := http.Get("https://example.com/")
if err != nil {
	log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 508 {
	fmt.Println(res.Status)
}

Specification

508 Loop Detected is defined in RFC 5842, section 7.2.

  • 208

    Already Reported

    Used inside a WebDAV 207 response to say a collection's members were already listed earlier, so they are not repeated.

  • 506

    Variant Also Negotiates

    A server configuration error in content negotiation: the chosen variant is itself set up to negotiate, creating a loop.

  • 503

    Service Unavailable

    The server cannot handle the request right now, usually because it is overloaded or down for maintenance. Try again later.

← all 63 HTTP status codes

Type to search posts, tools and projects.

Keyboard shortcuts

Search+Kor/
Go to homegthenh
Go to bloggthenb
Go to projectsgthenp
Go to timelinegthent
Show this help?
Close search or helpesc