[英]Getting 503 as Http response in android?
請檢查我的logcat。這是我解析http響應時得到的。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>503 Service Unavailable</title>
</head>
<body>
<h1>Error 503 Service Unavailable</h1>
<p>Service Unavailable</p>
<h3>Guru Meditation:</h3>
<p>XID: 1294992728</p>
<hr>
<p>Varnish cache server</p>
</body>
</html>
我在將圖像從android上傳到服務器時得到了這個響應。任何人都可以幫我解決這個問題嗎?
5xx
類型的錯誤是服務器端錯誤。 維基的HTTP狀態代碼列表表示錯誤代碼503
表示The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
所以,簡而言之,你的服務器似乎已經失敗了。
希望這些信息有所幫助
如您所說,服務器的錯誤是503,請檢查此鏈接一次。 它聲明可能由於以下原因而發生503錯誤:
- 從站點的IP名稱(沒有前導'http://'的站點URL)獲取IP地址。 此查找(將IP名稱轉換為IP地址)由域名服務器(DNS)提供。
- 打開與該IP地址的IP套接字連接。
- 通過該套接字寫入HTTP數據流。
- 作為響應,從Web服務器接收HTTP數據流。 此數據流包含狀態代碼,其值由HTTP協議確定。 解析此數據流以獲取狀態代碼和其他有用信息。
沒有實際看到你的VCL文件很難說...但是考慮到你在上傳時遇到了這個錯誤(一個POST請求)我猜你正在擊中其中一個后端超時[1]。
嘗試提高超時並查看錯誤是否仍然存在:
backend default {
.host = "your.host.tld"; //Use your current setting
.port = "XXX"; //Use your current setting
.connect_timeout = 300s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
}
[1] https://www.varnish-cache.org/docs/3.0/reference/vcl.html?highlight=timeout#backend-declarations
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.