504 Gateway Timeout
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 |