Stan
Stan

Reputation: 18

Varnish 503 after 200 from backend

I have a Varnish 4.0.3 server on Centos 7.2. Varnish has three backends configured. I am receiving intermittent 503's from Varnish. I have pulled a tcpdump during a 503 event, and I saw:

The requests that fail do not fundementally appear different from requests that are succeeding. The failure rate is ~1 per 20k requests.

  -   Begin          req 2795361 rxreq
  -   Timestamp      Start: 1464106437.502383 0.000000 0.000000
  -   Timestamp      Req: 1464106437.502383 0.000000 0.000000
  -   ReqStart       10.14.X.X 43190
  -   ReqMethod      GET
  -   ReqURL         /service/v2/service/parameter/parameter/parameter
  -   ReqProtocol    HTTP/1.1
  -   ReqHeader      Accept: application/json
  -   ReqHeader      Content-Type: application/json
  -   ReqHeader      Host: UpsteamLoadBalancer:6081
  -   ReqHeader      Connection: Keep-Alive
  -   ReqHeader      User-Agent: Apache-HttpClient/4.2.4 (java 1.5)
  -   ReqHeader      X-Forwarded-For: 10.14.X.X
  -   VCL_call       RECV
  -   ReqURL         /service/v2/service/parameter/parameter/parameter
  -   ReqUnset       X-Forwarded-For: 10.14.X.X
  -   ReqHeader      X-Forwarded-For: 10.14.X.X
  -   VCL_return     hash
  -   VCL_call       HASH
  -   VCL_return     lookup
  -   Debug          "XXXX MISS"
  -   VCL_call       MISS
  -   VCL_return     fetch
  -   Link           bereq 2795368 fetch
  -   Timestamp      Fetch: 1464106442.526296 5.023913 5.023913
  -   Timestamp      Process: 1464106442.526311 5.023929 0.000015
  -   RespHeader     Date: Tue, 24 May 2016 16:14:02 GMT
  -   RespHeader     Server: Varnish
  -   RespHeader     X-Varnish: 2795367
  -   RespProtocol   HTTP/1.1
  -   RespStatus     503
  -   RespReason     Service Unavailable
  -   RespReason     Service Unavailable
  -   VCL_call       SYNTH
  -   RespHeader     Content-Type: text/html; charset=utf-8
  -   RespHeader     Retry-After: 5
  -   VCL_return     deliver
  -   RespHeader     Content-Length: 281
  -   Debug          "RES_MODE 2"
  -   RespHeader     Connection: keep-alive
  -   Timestamp      Resp: 1464106442.526356 5.023974 0.000045
  -   ReqAcct        290 0 290 211 281 492
  -   End

Upvotes: 0

Views: 1065

Answers (1)

Sudhansu
Sudhansu

Reputation: 200

Your client is using HTTP to communicate with Varnish.

The HTTP response 503 represents mean "The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay".

So this error is sent by the Varnish server indicating above reason.

Regards, Sudhansu

Upvotes: 0

Related Questions