Odd varnish generated 503 issue

Stewart Robinson stewsnooze at gmail.com
Mon Feb 28 09:19:44 CET 2011


On 28 Feb 2011, at 08:12, Kevin Pettijohn <kpettijohn at dailyinsightgroup.com>
wrote:

Hello everyone,

I'm having some issues using varnish and pressflow. I am currently
running varnish-2.1.5 SVN 0843d7a with pressflow 6.17. The problem is a
small corner case and I have not been having much luck figuring it out. If
anyone can point me in the right direction that would be much appreciated.
The issue is that when a logged in user with administrative privileges tries
to view our /forum page it displays the varnish generated error page for a
503 after the 60 second first_byte_timeout.

On the other hand if the user is logged in but does not have administrative
privileges the /forum page loads just fine and the same goes for logged out
users.

I tried setting a pass in vcl but it didn't seem to help:

// Pass on forum pages
  if (req.url ~ "^/forum$") {
       return (pass);
  }

Here are is the varnishlog output for the failed request (logged in user
with admin):

   25 SessionOpen  c 75.146.54.221 53347 :80
   25 ReqStart     c 75.146.54.221 53347 366998573
   25 RxRequest    c GET
   25 RxURL        c /forum
   25 RxProtocol   c HTTP/1.1
   25 RxHeader     c Host: www.example.com
   25 RxHeader     c Connection: keep-alive
   25 RxHeader     c Referer: http://www.example.com/forum
   25 RxHeader     c Cache-Control: max-age=0
   25 RxHeader     c Accept:
application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
   25 RxHeader     c User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10_6_6; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215
Safari/534.10
   25 RxHeader     c Accept-Encoding: gzip,deflate,sdch
   25 RxHeader     c Accept-Language: en-US,en;q=0.8
   25 RxHeader     c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
   25 RxHeader     c Cookie: __qca=P0-2045062115-1295000757408;
PHPSESSID=hrvrdh7k9qva2544rfcrqm4u91;
BCKPHPSESSID=hrvrdh7k9qva2544rfcrqm4u91;
__utmz=240455574.1298425082.43.4.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=
http://example.com/; SESS26a2330bc4f50e2
   25 VCL_call     c recv pass
   25 VCL_call     c hash hash
   25 VCL_call     c pass pass
   25 Backend      c 21 dh web02
   25 FetchError   c http first read error: -1 11 (Resource temporarily
unavailable)
   25 VCL_call     c error deliver
   25 VCL_call     c deliver deliver
   25 TxProtocol   c HTTP/1.1
   25 TxStatus     c 503
   25 TxResponse   c Service Unavailable
   25 TxHeader     c Server: Varnish
   25 TxHeader     c Retry-After: 0
   25 TxHeader     c Content-Type: text/html; charset=UTF-8
   25 TxHeader     c Content-Length: 2385
   25 TxHeader     c Date: Thu, 24 Feb 2011 23:34:12 GMT
   25 TxHeader     c X-Varnish: 366998573
   25 TxHeader     c Age: 60
   25 TxHeader     c Via: 1.1 varnish
   25 TxHeader     c Connection: close
   25 TxHeader     c X-Cache: MISS
   25 Length       c 2385
   25 ReqEnd       c 366998573 1298590392.349307060 1298590452.349412918
0.000030041 60.000077963 0.000027895

    0 ExpKill      - 366993383 -300
    0 ExpKill      - 366993387 -300



Here is the log for a successful load (logged out user):



   32 SessionOpen  c 75.146.54.241 61453 :80
   32 ReqStart     c 75.146.54.241 61453 367412524
   32 RxRequest    c GET
   32 RxURL        c /forum
   32 RxProtocol   c HTTP/1.1
   32 RxHeader     c Host: www.example.com
   32 RxHeader     c Accept-Encoding: gzip, deflate
   32 RxHeader     c Accept-Language: en-us
   32 RxHeader     c User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3
Safari/533.19.4
   32 RxHeader     c Accept:
application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
   32 RxHeader     c Cookie: __utmc=240455574;
__utma=240455574.1048652604.1298005414.1298005414.1298425351.2;
__utmz=240455574.1298005414.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
   32 RxHeader     c Connection: keep-alive
   32 VCL_call     c recv pass
   32 VCL_call     c hash hash
   32 VCL_call     c pass pass
   32 Backend      c 9 dh web03
   32 TTL          c 367412524 RFC 600 1298659484 0 0 600 0
   32 VCL_call     c fetch pass
   32 ObjProtocol  c HTTP/1.1
   32 ObjStatus    c 200
   32 ObjResponse  c OK
   32 ObjHeader    c Date: Fri, 25 Feb 2011 18:45:29 GMT
   32 ObjHeader    c Server: Apache/2.2.8 (Unix) PHP/5.2.5 mod_ssl/2.2.8
OpenSSL/0.9.7a
   32 ObjHeader    c X-Powered-By: PHP/5.2.5
   32 ObjHeader    c Cache-Control: public, max-age=600
   32 ObjHeader    c Last-Modified: Fri, 25 Feb 2011 18:45:29 +0000
   32 ObjHeader    c Expires: Sun, 11 Mar 1984 12:00:00 GMT
   32 ObjHeader    c Vary: Cookie
   32 ObjHeader    c ETag: "1298659529"
   32 ObjHeader    c Content-Type: text/html; charset=utf-8
   32 VCL_call     c deliver deliver
   32 TxProtocol   c HTTP/1.1
   32 TxStatus     c 200
   32 TxResponse   c OK
   32 TxHeader     c Server: Apache/2.2.8 (Unix) PHP/5.2.5 mod_ssl/2.2.8
OpenSSL/0.9.7a
   32 TxHeader     c X-Powered-By: PHP/5.2.5
   32 TxHeader     c Cache-Control: public, max-age=600
   32 TxHeader     c Last-Modified: Fri, 25 Feb 2011 18:45:29 +0000
   32 TxHeader     c Expires: Sun, 11 Mar 1984 12:00:00 GMT
   32 TxHeader     c Vary: Cookie
   32 TxHeader     c ETag: "1298659529"
   32 TxHeader     c Content-Type: text/html; charset=utf-8
   32 TxHeader     c Content-Length: 83552
   32 TxHeader     c Date: Fri, 25 Feb 2011 18:44:45 GMT
   32 TxHeader     c X-Varnish: 367412524
   32 TxHeader     c Age: 0
   32 TxHeader     c Via: 1.1 varnish
   32 TxHeader     c Connection: keep-alive
   32 TxHeader     c X-Cache: MISS
   32 Length       c 83552
   32 ReqEnd       c 367412524 1298659483.560426950 1298659485.242687941
0.000025988 1.473248959 0.209012032


If anyone can give me some insight It would be greatly appreciated
__________________
Kevin Pettijohn
503 927 3585
Operations & IT
The Daily Insight Group
kpettijohn at tarot.com





_______________________________________________
varnish-misc mailing list
varnish-misc at varnish-cache.org
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Does the forum page load for the admin user if you point your browser
directly at the backend? When logged in the forum page will do lot of extra
queries to determine which forums need to show new counts e.t.c.

It could be that the page is simply timing out

Stew

Sent from my iPhone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110228/342a4569/attachment-0003.html>


More information about the varnish-misc mailing list