[Varnish] #1265: Randomly getting 503 errors while using Varnish with Apache

Varnish varnish-bugs at varnish-cache.org
Fri Feb 15 14:00:21 CET 2013


#1265: Randomly getting 503 errors while using Varnish with Apache
-----------------------------+----------------------
 Reporter:  abhishekjain203  |       Type:  defect
   Status:  new              |   Priority:  normal
Milestone:                   |  Component:  varnishd
  Version:  3.0.3            |   Severity:  normal
 Keywords:                   |
-----------------------------+----------------------
 Hi,

 We are using Pound, Varnish with Apache on our server and we occasionally
 get 503 errors on some of the pages. Below is the Varnish log:

 201 SessionOpen  c 66.87.117.80 39422 208.113.240.79:80
   201 ReqStart     c 66.87.117.80 39422 1459793886
   201 RxRequest    c GET
   201 RxURL        c /templates/ja_elastica/css/typo.css
   201 RxProtocol   c HTTP/1.1
   201 RxHeader     c Accept:
 text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, text/css,
 image/*, application/javascript, application/vbscript, */*
   201 RxHeader     c x-wap-profile:
 http://device.sprintpcs.com/Samsung/SPH-L710/LJ7.rdf
   201 RxHeader     c User-Agent: Mozilla/5.0 (Linux; U; Android 4.1.1; en-
 us; SPH-L710 Build/JRO03L) AppleWebKit/534.30 (KHTML, like Gecko)
 Version/4.0 Mobile Safari/534.30
   201 RxHeader     c Accept-Encoding: gzip,deflate
   201 RxHeader     c Accept-Language: en-US
   201 RxHeader     c Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7
   201 RxHeader     c Cookie:
 2fda71d172c9d46b6d4c8e631064f5e0=xom9uHeaplOMwN3EF5N7Z3;
 ja_elastica_tpl=ja_elastica;
 __utma=112986586.416097245.1360781530.1360781530.1360826480.2;
 __utmc=112986586;
 __utmz=112986586.1360781530.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
 _
   201 RxHeader     c Host: www.organicfacts.net
   201 RxHeader     c Cache-Control: max-age=43200
   201 RxHeader     c Connection: keep-alive
   201 VCL_call     c recv pass
   201 VCL_call     c hash
   201 Hash         c /templates/ja_elastica/css/typo.css
   201 Hash         c www.organicfacts.net
   201 VCL_return   c hash
   201 VCL_call     c pass pass
   201 Backend      c 203 default default
   201 TTL          c 1459793886 RFC -1 -1 -1 1360926637 0 1360926637 0 0
   201 VCL_call     c fetch
   201 TTL          c 1459793886 VCL 120 -1 -1 1360926637 -0
   201 VCL_return   c hit_for_pass
   201 ObjProtocol  c HTTP/1.1
   201 ObjResponse  c Service Temporarily Unavailable
   201 ObjHeader    c Date: Fri, 15 Feb 2013 11:10:37 GMT
   201 ObjHeader    c Server: Apache
   201 ObjHeader    c Vary: Accept-Encoding
   201 ObjHeader    c Content-Encoding: gzip
   201 ObjHeader    c Content-Length: 236
   201 ObjHeader    c Content-Type: text/html; charset=iso-8859-1
   201 Gzip         c u F - 236 323 80 80 1823
   201 VCL_call     c deliver deliver
   201 TxProtocol   c HTTP/1.1
   201 TxStatus     c 503
   201 TxResponse   c Service Temporarily Unavailable
   201 TxHeader     c Server: Apache
   201 TxHeader     c Vary: Accept-Encoding
   201 TxHeader     c Content-Encoding: gzip
   201 TxHeader     c Content-Type: text/html; charset=iso-8859-1
   201 TxHeader     c Content-Length: 236
   201 TxHeader     c Accept-Ranges: bytes
   201 TxHeader     c Date: Fri, 15 Feb 2013 11:10:37 GMT
   201 TxHeader     c X-Varnish: 1459793886
   201 TxHeader     c Age: 0
   201 TxHeader     c Via: 1.1 varnish
   201 TxHeader     c Connection: keep-alive
   201 Length       c 236
   201 ReqEnd       c 1459793886 1360926637.034808159 1360926637.036862135
 0.000040293 0.002015114 0.000038862

 Below are the parameters that we are passing while running varnish:

 varnishd -f /etc/varnish/default.vcl -s malloc,2.5G -T 127.0.0.1:2000 -a
 208.113.241.84:80,208.113.240.79:80,127.0.0.3:80 -p thread_pool_max=1500
 -p thread_pools=4 -p listen_depth=2048 -p lru_interval=1800 -h
 classic,169313 -p first_byte_timeout=600 -p sess_timeout=600 -p
 sess_workspace=131072 -p connect_timeout=600 -p max_restarts=6 -p
 vcl_trace=on

 And this is our vcl config:

 backend default {
   .host = "127.0.0.2";
   .port = "80";
   .connect_timeout = 600s;
   .first_byte_timeout = 600s;
   .between_bytes_timeout = 600s;
 }

 backend mydomain{
         .host = "127.0.0.4";
         .port = "80";
         .connect_timeout = 600s;
         .first_byte_timeout = 600s;
         .between_bytes_timeout = 600s;
 }

 sub vcl_recv {
         # choose a backend depending on domain
         if (req.http.host ~ "www.villcart.com") {
                 set req.backend = mydomain;
         }else{
                 set req.backend = default;
         }
 }

 As there is no error in both the varnish log and apache log, we are not
 able to figure out where the problem is. Could you please help us out?

 Regards,
 Abhishek

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1265>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list