504 閘道器超時
HTTP 的504 閘道器超時 伺服器錯誤響應 狀態碼錶示伺服器在充當閘道器或代理時,沒有及時從上游伺服器獲得響應以完成請求。這類似於502 錯誤閘道器,不同之處在於,在 504 狀態下,代理或閘道器在一定時間內未從源伺服器收到任何 HTTP 響應。
504 錯誤有很多原因,解決此類問題可能需要伺服器管理員進行調查和除錯,或者網站稍後可能會恢復正常。客戶端網路錯誤除外,特別是如果服務對其他訪問者有效,以及客戶端使用 VPN 或其他自定義網路設定時。在這種情況下,客戶端應檢查網路設定、防火牆設定、代理設定、DNS 配置等。
狀態
http
504 Gateway Timeout
示例
504 閘道器超時響應
以下請求嘗試獲取網頁,但返回 504 響應。響應正文包含一個頁面,其中描述了伺服器狀態,並提供了一個指向訪客支援頁面的連結。
http
GET /highlights HTTP/1.1
Host: example.com
User-Agent: curl/8.6.0
Accept: */*
http
HTTP/1.1 504 Gateway Timeout
Content-Type: text/html;
Content-Length: 123
<!doctype html>
<html lang="en">
<head>
  <title>504 Gateway Timeout</title>
</head>
<body>
  <h1>Gateway timeout</h1>
  <p>The server did not respond in time. Please try again later.</p>
  <p>If this problem persists, please <a href="https://example.com/support">contact support</a>.</p>
</body>
</html>
規範
| 規範 | 
|---|
| HTTP 語義 # status.504 |