HTTPQUERY
Bahasa Indonesia

508 Loop Detected

Penggunaan khusus untuk WebDAV

Kode status 508 Loop Detected terjadi ketika klien mengirimkan request WebDAV untuk seluruh isi sebuah direktori dan hasilnya membuat target di dalam pohon yang sama. Hal ini menghasilkan loop request/response tak hingga dengan Depth: Infinity, dan server menghentikan seluruh operasi tersebut.

Penggunaan khusus untuk cPanel / CloudLinux

Kode status 508 Resource Limit Is Reached dihasilkan oleh lingkungan shared hosting yang menjalankan cPanel dengan CloudLinux ketika salah satu batas sumber daya akun telah terlampaui. Contoh batas sumber daya meliputi penggunaan CPU, memori fisik, throughput I/O, dan jumlah proses bersamaan (entry process).

Dampak SEO

Mesin pencari memperlakukan 508 sama seperti error server 5xx lainnya. Kegagalan yang persisten menurunkan laju perayapan dan pada akhirnya menghapus URL yang terdampak dari indeks.

Contoh

Sebuah klien WebDAV meminta daftar direktori secara rekursif. Server mendeteksi loop binding di dalam hierarki koleksi dan menghentikan request tersebut.

Permintaan

PROPFIND /shared/ HTTP/1.1
Host: example.com
Depth: infinity
Content-Type: application/xml

Respons

HTTP/1.1 508 Loop Detected
Content-Type: text/html; charset=UTF-8
Content-Length: 174

<html>
  <head>
    <title>Loop Detected</title>
  </head>
  <body>
    <p>The server detected an infinite loop
    while processing the directory tree.</p>
  </body>
</html>

Cara memperbaiki

Untuk WebDAV (508 Loop Detected):

Sebuah PROPFIND dengan Depth: infinity menemui binding melingkar, yaitu ketika sebuah koleksi berisi referensi balik ke induknya atau ke dirinya sendiri.

Untuk cPanel / CloudLinux (508 Resource Limit Is Reached):

Akun hosting melampaui salah satu batas sumber daya: CPU, memori, I/O, atau jumlah entry process.

Referensi kode

.NET

HttpStatusCode.LoopDetected

Rust

http::StatusCode::LOOP_DETECTED

Rails

:loop_detected

Go

http.StatusLoopDetected

Symfony

Response::HTTP_LOOP_DETECTED

Python3.5+

http.HTTPStatus.LOOP_DETECTED

Apache HttpComponents Core

org.apache.hc.core5.http.HttpStatus.SC_LOOP_DETECTED

Angular

@angular/common/http/HttpStatusCode.LoopDetected