Вопрос

Please check my logcat.This is what I get when I parse the http response.

<!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>

I am getting this response while uploading an image from android to server.Can anyone help me out with this problem?

Это было полезно?

Решение

As you have stated that the Error is 503 from server, Please check this link once. It states that the 503 error may occur due to following reasons:

  1. Obtain an IP address from the IP name of the site (the site URL without the leading 'http://'). This lookup (conversion of IP name to IP address) is provided by domain name servers (DNSs).
  2. Open an IP socket connection to that IP address.
  3. Write an HTTP data stream through that socket.
  4. Receive an HTTP data stream back from the Web server in response. This data stream contains status codes whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.

Другие советы

5xx type of error is a server side error. List of HTTP status codes at wiki states that Error code 503 means The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state. So, in short your server seems to be down.

Hope this information helps.

It's hard to tell without actually seeing your VCL file... but taking account that you get that error while uploading (a POST request) I guess you're hitting one of the the backend timeouts[1].

Try to rise timeouts and see if the error persists:

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 с атрибуция
Не связан с StackOverflow
scroll top