Re: A few users see a blank page
On Thu, Feb 14, 2008 at 11:16 AM, Poul-Henning Kamp [EMAIL PROTECTED] wrote: In message [EMAIL PROTECTED], Erik writes: - web server: Centos 4 + Apache 2.0.52 + PHP 4.3.9 + Varnish= 1.1.2 Ok, I think this bug has been fixed, as also indicated by ticket 188 Hi, I can confirm it's fixed in trunk. I'm sorry I didn't test it earlier. Thanks Marco ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: A few users see a blank page
On Thu, Feb 14, 2008 at 12:02 PM, Dag-Erling Smørgrav [EMAIL PROTECTED] wrote: You didn't say which version you're using, but from this backend definition, it's certainly not trunk. It would be very helpful to know whether you see the same behaviour with trunk. Hi, I tried trunk and I don't get any blank page with it. I'm sorry I didn't try it earlier. if (req.http.Pragma == no-cache) { pipe; } Are you sure you want to do this? If the point of this is to allow the client to Shift-Reload, you should purge the URL to force a reload from the backend, instead of piping the request. That's the point, I just needed a quick way to purge an URL. Later I'll definetely purge it from the backend. Thanks for your reply, I'm still learning a lot about Varnish, especially the difference between pass and pipe. Actually the pipe for POST and req.http.Expect were taken from the default vcl. If I understand correctly pipe means that further data between client and server is passed until the connection is closed, while pass means that the current request will be passed, but further requests in the same connection will be normally processed by the vcl file (and could be looked-up, for example). Is this correct? Would you please make some examples where pass and pipe are preferred? Thanks, Marco ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: A few users see a blank page
Marco Molinari [EMAIL PROTECTED] writes: Dag-Erling Smørgrav [EMAIL PROTECTED] writes: If the point of this is to allow the client to Shift-Reload, you should purge the URL to force a reload from the backend, instead of piping the request. That's the point, I just needed a quick way to purge an URL. This won't do what you want; the client that used Pragma: no-cache will see a new version, but other clients won't. Additionally, I would recommend that you use an ACL to restrict purging to specific clients. Thanks for your reply, I'm still learning a lot about Varnish, especially the difference between pass and pipe. Actually the pipe for POST and req.http.Expect were taken from the default vcl. The *old* default VCL :) I haven't had time to update the documentation. If I understand correctly pipe means that further data between client and server is passed until the connection is closed, while pass means that the current request will be passed, but further requests in the same connection will be normally processed by the vcl file (and could be looked-up, for example). Absolutely correct. Is this correct? Would you please make some examples where pass and pipe are preferred? pass is preferred whenever possible; pipe should only be used for requests that Varnish can't handle at all because they don't follow the ususal HTTP structure (CONNECT is the only example I can think of at the moment) In the past, pass could not handle POST requests at all; later, it could handle them but poorly (insufficient error recovery). The current code in trunk handles POST requests correctly in pass mode. DES -- Dag-Erling Smørgrav Senior Software Developer Linpro AS - www.linpro.no ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: A few users see a blank page
Hi, I have seen the same behaviour on my Apache2 server with php5 installed. Many users got blank pages when navigating around the website. I couldn't figure out what the problem was so I simply removed varnish and the problem disappeared. Another problem I had was that php's X-FORWARDED-FOR was empty at random times. I looked in the apache2 log and saw some empty fields their too. Couldn't find a solution for it :( / Erik Marco Molinari skrev: I can now reproduce it and I found a lot of info. I wrote a simple script that keeps on reloading itself, adding some chars each time; I disabled compression both in Apache and in PHP and I connect my browser through a 2.6 Squid proxy; and now I can't see PHP pages larger than 8000 bytes. I also found an interesting connection with cookies. Here are the log lines for Varnish requesting two pages to Apache: Apache: 127.0.0.1, 10.0.2.2 - - [12/Feb/2008:14:24:26 +0100] GET /test_varnish2.php?n=10t=1202822659 HTTP/1.0 200 8000 - {MY-USER-AGENT} 127.0.0.1, 10.0.2.2 - - [12/Feb/2008:14:24:29 +0100] GET /test_varnish2.php?n=11t=1202822659 HTTP/1.0 200 8001 - {MY-USER-AGENT} Varnish: 10.0.2.2 - - [12/Feb/2008:14:24:26 +0100] GET http://dev.{MY-SITE}:2280/test_varnish2.php?n=10t=1202822659 HTTP/1.0 200 8000 - {MY-USER-AGENT} 10.0.2.2 - - [12/Feb/2008:14:24:29 +0100] GET http://dev.{MY-SITE}:2280/test_varnish2.php?n=11t=1202822659 HTTP/1.0 200 0 - {MY-USER-AGENT} As you can see Varnish logs a 0 size for the 8001 bytes request. Here is the extended log (as per varnishlog) for those requests (sorry for the length): 15 ReqStart c 10.0.2.2 43859 67671826 15 RxRequestc GET 15 RxURLc /test_varnish2.php?n=10t=1202822659 15 RxProtocol c HTTP/1.0 15 RxHeader c Host: dev.{MY-SITE}:2280 15 RxHeader c User-Agent: {MY-USER-AGENT} 15 RxHeader c Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 15 RxHeader c Accept-Language: en-us,en;q=0.5 15 RxHeader c Accept-Encoding: gzip,deflate 15 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 15 RxHeader c Cookie: __utma=.xx.xx.xx.xx.23; __utmz=.xx.21.5.utmcsr=mail.google.com|utmccn=(referral)|utmcmd=referral|utmcct=%2Fmail%2F; __utmz=.xx.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(non 15 RxHeader c Via: 1.1 virtual:3129 (squid/2.6.STABLE14) 15 RxHeader c X-Forwarded-For: 127.0.0.1 15 RxHeader c Cache-Control: max-age=259200 15 RxHeader c Connection: keep-alive 15 VCL_call c recv 15 VCL_return c pass 15 VCL_call c pass 15 VCL_return c pass 18 BackendOpen b default 127.0.0.1 32988 127.0.0.1 8080 18 BackendXID b 67671826 15 Backend c 18 default 18 TxRequestb GET 18 TxURLb /test_varnish2.php?n=10t=1202822659 18 TxProtocol b HTTP/1.0 18 TxHeader b Host: dev.{MY-SITE}:2280 18 TxHeader b User-Agent: {MY-USER-AGENT} 18 TxHeader b Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 18 TxHeader b Accept-Language: en-us,en;q=0.5 18 TxHeader b Accept-Encoding: gzip,deflate 18 TxHeader b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 18 TxHeader b Cookie: __utma=.xx.xx.xx.xx.23; __utmz=.xx.21.5.utmcsr=mail.google.com|utmccn=(referral)|utmcmd=referral|utmcct=%2Fmail%2F; __utmz=xx.xx.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(non 18 TxHeader b Via: 1.1 virtual:3129 (squid/2.6.STABLE14) 18 TxHeader b X-Forwarded-For: 127.0.0.1 18 TxHeader b X-Varnish: 67671826 18 TxHeader b X-Forwarded-for: 10.0.2.2 18 RxProtocol b HTTP/1.1 18 RxStatus b 200 18 RxResponse b OK 18 RxHeader b Date: Tue, 12 Feb 2008 13:24:26 GMT 18 RxHeader b Server: Apache/2.0.52 (CentOS) 18 RxHeader b X-Powered-By: PHP/4.3.9 18 RxHeader b Content-Length: 8000 18 RxHeader b Connection: close 18 RxHeader b Content-Type: text/html; charset=UTF-8 15 ObjProtocol c HTTP/1.1 15 ObjStatusc 200 15 ObjResponse c OK 15 ObjHeaderc Date: Tue, 12 Feb 2008 13:24:26 GMT 15 ObjHeaderc Server: Apache/2.0.52 (CentOS) 15 ObjHeaderc X-Powered-By: PHP/4.3.9 15 ObjHeaderc Content-Type: text/html; charset=UTF-8 18 BackendClose b default 15 TTL c 67671826 RFC 120 1202822666 1202822666 0 0 0 15 VCL_call c fetch 15 VCL_return c insert 15 Length c 8000 15 VCL_call c deliver 15 VCL_return c deliver 15 TxProtocol c HTTP/1.1 15 TxStatus c 200 15 TxResponse c OK 15 TxHeader c Server: Apache/2.0.52 (CentOS) 15 TxHeader c X-Powered-By:
Re: A few users see a blank page
I can now reproduce it and I found a lot of info. I wrote a simple script that keeps on reloading itself, adding some chars each time; I disabled compression both in Apache and in PHP and I connect my browser through a 2.6 Squid proxy; and now I can't see PHP pages larger than 8000 bytes. I also found an interesting connection with cookies. Here are the log lines for Varnish requesting two pages to Apache: Apache: 127.0.0.1, 10.0.2.2 - - [12/Feb/2008:14:24:26 +0100] GET /test_varnish2.php?n=10t=1202822659 HTTP/1.0 200 8000 - {MY-USER-AGENT} 127.0.0.1, 10.0.2.2 - - [12/Feb/2008:14:24:29 +0100] GET /test_varnish2.php?n=11t=1202822659 HTTP/1.0 200 8001 - {MY-USER-AGENT} Varnish: 10.0.2.2 - - [12/Feb/2008:14:24:26 +0100] GET http://dev.{MY-SITE}:2280/test_varnish2.php?n=10t=1202822659 HTTP/1.0 200 8000 - {MY-USER-AGENT} 10.0.2.2 - - [12/Feb/2008:14:24:29 +0100] GET http://dev.{MY-SITE}:2280/test_varnish2.php?n=11t=1202822659 HTTP/1.0 200 0 - {MY-USER-AGENT} As you can see Varnish logs a 0 size for the 8001 bytes request. Here is the extended log (as per varnishlog) for those requests (sorry for the length): 15 ReqStart c 10.0.2.2 43859 67671826 15 RxRequestc GET 15 RxURLc /test_varnish2.php?n=10t=1202822659 15 RxProtocol c HTTP/1.0 15 RxHeader c Host: dev.{MY-SITE}:2280 15 RxHeader c User-Agent: {MY-USER-AGENT} 15 RxHeader c Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 15 RxHeader c Accept-Language: en-us,en;q=0.5 15 RxHeader c Accept-Encoding: gzip,deflate 15 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 15 RxHeader c Cookie: __utma=.xx.xx.xx.xx.23; __utmz=.xx.21.5.utmcsr=mail.google.com|utmccn=(referral)|utmcmd=referral|utmcct=%2Fmail%2F; __utmz=.xx.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(non 15 RxHeader c Via: 1.1 virtual:3129 (squid/2.6.STABLE14) 15 RxHeader c X-Forwarded-For: 127.0.0.1 15 RxHeader c Cache-Control: max-age=259200 15 RxHeader c Connection: keep-alive 15 VCL_call c recv 15 VCL_return c pass 15 VCL_call c pass 15 VCL_return c pass 18 BackendOpen b default 127.0.0.1 32988 127.0.0.1 8080 18 BackendXID b 67671826 15 Backend c 18 default 18 TxRequestb GET 18 TxURLb /test_varnish2.php?n=10t=1202822659 18 TxProtocol b HTTP/1.0 18 TxHeader b Host: dev.{MY-SITE}:2280 18 TxHeader b User-Agent: {MY-USER-AGENT} 18 TxHeader b Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 18 TxHeader b Accept-Language: en-us,en;q=0.5 18 TxHeader b Accept-Encoding: gzip,deflate 18 TxHeader b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 18 TxHeader b Cookie: __utma=.xx.xx.xx.xx.23; __utmz=.xx.21.5.utmcsr=mail.google.com|utmccn=(referral)|utmcmd=referral|utmcct=%2Fmail%2F; __utmz=xx.xx.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(non 18 TxHeader b Via: 1.1 virtual:3129 (squid/2.6.STABLE14) 18 TxHeader b X-Forwarded-For: 127.0.0.1 18 TxHeader b X-Varnish: 67671826 18 TxHeader b X-Forwarded-for: 10.0.2.2 18 RxProtocol b HTTP/1.1 18 RxStatus b 200 18 RxResponse b OK 18 RxHeader b Date: Tue, 12 Feb 2008 13:24:26 GMT 18 RxHeader b Server: Apache/2.0.52 (CentOS) 18 RxHeader b X-Powered-By: PHP/4.3.9 18 RxHeader b Content-Length: 8000 18 RxHeader b Connection: close 18 RxHeader b Content-Type: text/html; charset=UTF-8 15 ObjProtocol c HTTP/1.1 15 ObjStatusc 200 15 ObjResponse c OK 15 ObjHeaderc Date: Tue, 12 Feb 2008 13:24:26 GMT 15 ObjHeaderc Server: Apache/2.0.52 (CentOS) 15 ObjHeaderc X-Powered-By: PHP/4.3.9 15 ObjHeaderc Content-Type: text/html; charset=UTF-8 18 BackendClose b default 15 TTL c 67671826 RFC 120 1202822666 1202822666 0 0 0 15 VCL_call c fetch 15 VCL_return c insert 15 Length c 8000 15 VCL_call c deliver 15 VCL_return c deliver 15 TxProtocol c HTTP/1.1 15 TxStatus c 200 15 TxResponse c OK 15 TxHeader c Server: Apache/2.0.52 (CentOS) 15 TxHeader c X-Powered-By: PHP/4.3.9 15 TxHeader c Content-Type: text/html; charset=UTF-8 15 TxHeader c Content-Length: 8000 15 TxHeader c Date: Tue, 12 Feb 2008 13:24:26 GMT 15 TxHeader c X-Varnish: 67671826 15 TxHeader c Age: 0 15 TxHeader c Via: 1.1 varnish 15 TxHeader c Connection: keep-alive 15 ReqEnd c 67671826 1202822666.438220024 1202822666.440738916 3.759930134 0.002374887 0.000144005 0 StatAddr 10.0.2.2 0 4217 31 171 0 0 171 41937 1114752 0 CLIRd ping 0 CLIWr 0 200
Re: A few users see a blank page
Pretty much all my pages are in the 10k to 30k range, so I guess I am confirming this. It sucks that this is so hard to reproduce :( I'm considering moving all the stuff I want cached to a different hostname / ip address, and let the clients talk directly to Apache again for the pages themselves, but that defeats half the purpose. -Arne Marco Molinari wrote: On Feb 6, 2008 2:57 AM, Arne Kepp [EMAIL PROTECTED] wrote: (Maybe this should be on -misc ?) Ok, moved. Thank you for your reply. I'm using PHP and I had it gzip'ing, then I tried to use mod_deflate, but they're reporting the problem anyway. But I think the problem is similar. In fact, thanks to a user, I did some tests and I discovered that: - they can see static content, even html, any length - they can see content generated by PHP if it's smaller than 7500 bytes - they get a blank page if PHP output is more than 8000 bytes - they see everything if the accelerator is Squid I disabled compression during these tests. Maybe your users see a blank page just sometimes, when they request a page that, compressed, is larger than 7500/8000 bytes? Sorry I don't have a precise number, but I didn't want to stress my user too much, but I suppose I can work that out. I can't replicate this myself; I tried to use Squid (even different versions) on the client side, to replicate their setup, but I just see everything. My VCL is quite simple, too, lookup for images/css and pipe/pass for everything else. Any idea of what's happening? What can I do to find more clues? Thanks Marco I've seen one odd (to me) problem like this that I was able to reproduce consistently, thanks to the help of a user. If you are serving PHP, and PHP is gzip'ing the output then clients behind a Squid proxy (on their end) only get blank pages. Squid records something like TCP_MISS/200 416 GET script name? - DIRECT/ip address text/html in the logs, but doesn't appear to get the page. Moving gzip compression from PHP to Apache solved this particular problem, but I still have users reporting blank pages every now and then. I've been accused of blocking all sorts of clients for this reason. My VCL file is simple, it's the standard logic + lookup for image and css extensions and pass for everything else (also tried pipe). -Arne Marco Molinari wrote: Hi, I recently deployed Varnish and its performance is simply incredible. I'm having a problem, though, which made me jump back to Squid. In the week I used Varnish I had some users mailing me that they couldn't see the site anymore, they just saw a blank page. It seems this affects a small percentage of the users, as I got just about 10 emails in a week and my users are in the 1s, and in fact I didn't notice any problem in the stats; so I setup two servers, one with Squid and the other with Varnish, and the affected users see the site only through Squid. I'm trying to understand what's happening and with the help of some users here's what I discovered: - every user who has problems connects from an office (completely different places, of course) - at least one user connects via a proxy (she has a header that says Via: 1.1 SRVFW1) - Apache serves the page, which is logged with the correct size - they can see very small pages (a test I did just printed Thanks + the timestamp) This happens both with 1.1.2 and trunk. On standard log files I can't find anything, I couldn't even know it was happening if those users didn't email me. I'd like to have more data before submitting a bug report; do you have any suggestion on how and what I could collect? Thanks Marco Molinari ___ varnish-dev mailing list [EMAIL PROTECTED] http://projects.linpro.no/mailman/listinfo/varnish-dev ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc !DSPAM:4038,47ab243e203721015089218! ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: A few users see a blank page
On Feb 6, 2008 2:57 AM, Arne Kepp [EMAIL PROTECTED] wrote: (Maybe this should be on -misc ?) Ok, moved. Thank you for your reply. I'm using PHP and I had it gzip'ing, then I tried to use mod_deflate, but they're reporting the problem anyway. But I think the problem is similar. In fact, thanks to a user, I did some tests and I discovered that: - they can see static content, even html, any length - they can see content generated by PHP if it's smaller than 7500 bytes - they get a blank page if PHP output is more than 8000 bytes - they see everything if the accelerator is Squid I disabled compression during these tests. Maybe your users see a blank page just sometimes, when they request a page that, compressed, is larger than 7500/8000 bytes? Sorry I don't have a precise number, but I didn't want to stress my user too much, but I suppose I can work that out. I can't replicate this myself; I tried to use Squid (even different versions) on the client side, to replicate their setup, but I just see everything. My VCL is quite simple, too, lookup for images/css and pipe/pass for everything else. Any idea of what's happening? What can I do to find more clues? Thanks Marco I've seen one odd (to me) problem like this that I was able to reproduce consistently, thanks to the help of a user. If you are serving PHP, and PHP is gzip'ing the output then clients behind a Squid proxy (on their end) only get blank pages. Squid records something like TCP_MISS/200 416 GET script name? - DIRECT/ip address text/html in the logs, but doesn't appear to get the page. Moving gzip compression from PHP to Apache solved this particular problem, but I still have users reporting blank pages every now and then. I've been accused of blocking all sorts of clients for this reason. My VCL file is simple, it's the standard logic + lookup for image and css extensions and pass for everything else (also tried pipe). -Arne Marco Molinari wrote: Hi, I recently deployed Varnish and its performance is simply incredible. I'm having a problem, though, which made me jump back to Squid. In the week I used Varnish I had some users mailing me that they couldn't see the site anymore, they just saw a blank page. It seems this affects a small percentage of the users, as I got just about 10 emails in a week and my users are in the 1s, and in fact I didn't notice any problem in the stats; so I setup two servers, one with Squid and the other with Varnish, and the affected users see the site only through Squid. I'm trying to understand what's happening and with the help of some users here's what I discovered: - every user who has problems connects from an office (completely different places, of course) - at least one user connects via a proxy (she has a header that says Via: 1.1 SRVFW1) - Apache serves the page, which is logged with the correct size - they can see very small pages (a test I did just printed Thanks + the timestamp) This happens both with 1.1.2 and trunk. On standard log files I can't find anything, I couldn't even know it was happening if those users didn't email me. I'd like to have more data before submitting a bug report; do you have any suggestion on how and what I could collect? Thanks Marco Molinari ___ varnish-dev mailing list [EMAIL PROTECTED] http://projects.linpro.no/mailman/listinfo/varnish-dev !DSPAM:4038,47a7621398828992556831! ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc