Re: Some web site make Varnish return a blank page

2010-01-28 Thread Martin Boer
I'm not a guru so I could really use more information to figure out 
exactly what is happening.

Are you implying that when you have varnish in front of your 2 websites 
it is working correctly when accessing the sites through wget but not 
hen using internet explorer and/or firefox ?
If so, could you paste some varnishlog of

wget - varnish - site1
- site2

firefox - varnish - site1
- site2

explorer - varnish - site1
- site2

and describe for each if it is working or not.

Martin


fulan Peng wrote:
 Hi Varnish gurus:

 I am new to varnish. I got Varnish working with default config with
 one web site.
 when I change to another web site, varnish response with a blank page.
 html /html
  wget can normally fetch the index.html page.

 When I start varnishlog and cat varnish.log file, there are a lot of
 PING and PONG. No clue what is wrong.

 No other error message.

 Please help me out! Thank you!

 Fulan Peng
 ___
 varnish-misc mailing list
 varnish-misc@projects.linpro.no
 http://projects.linpro.no/mailman/listinfo/varnish-misc


   

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Not Able to Purge in Varnish

2010-01-28 Thread Abhishek Singh
Hi All,

I am using varnish for static files caching and multiple domains are getting
served from varnish cluster  and i want to purge static files for specific
domain so how can i do that.

I tired following but it is not working.

1)
purge req.http.host ~ xyz.com
101 44
Unknown request.
Type 'help' for more info


2) url.purge req.http.host ~ xyz.com
105 20
Too many parameters

Please let me know how can purge domain specific files.





-- 
Abhishek Kumar Singh
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: [varnish] Re: [varnish] Re: Handling of cache-control

2010-01-28 Thread Bedis 9
hey,

That way, any shared proxy cache on the path between our caches and
the client would cache the object.
Our customer didn't want this. The purpose was to have the freshest
information as close as the origin as possible.

cheers


On Thu, Jan 28, 2010 at 12:00 AM, pablort pablort+varn...@gmail.com wrote:
 Isn't this the equivalent of and max-age=5 and s-maxage=0 ?

 On Wed, Jan 20, 2010 at 7:19 AM, Bedis 9 bed...@gmail.com wrote:

 Hi,

 Netcache devices had the X-Accel-Cache-Control headers in order to
 allow an origin server to setup different Cache-Control parameters for
 the cache and the end-user.
 The netcache will follow the X-Accel-Cache-Control while the end user
 will follow the Cache-Control.

 I've a few customer using this, mainly for sports events where live
 is the key.
 They setup X-Accel-Cache-Control to max-age=5 while Cache-Control is
 set to no-cache.
 That way, all the load generated by thousends of request per second
 for live stuff is offloaded to the cache layer.
 Only a few request goes back to the origin.


 I was able to reproduce such behavior with the following inline C:
 sub vcl_fetch {
 [...]
 # Check if X-Accel-Cache-Control exists and follow it
        if (obj.http.X-Accel-Cache-Control) {
 C{
        char *cache;
        int max_age = 0;
        cache = VRT_GetHdr(sp, HDR_OBJ, \026X-Accel-Cache-Control:);
        if(cache) {
                char *s = NULL;
                /* Looking for max-age */
                if (s = strstr(cache, max-age=)) {
                        s+=8;
                        max_age = strtoul(s, 0, 0);
                        if (max_age) {
                                VRT_l_obj_ttl(sp, max_age);
                        }
                }
        }
 }C
       unset obj.http.X-Accel-Cache-Control;
        }

 # Cache-Control and Pragma headers preventing caching
        if ((!obj.http.X-Accel-Cache-Control)  (obj.http.Pragma ~
 no-cache || obj.http.Cache-Control ~ (no-cache|no-store|private)))
 {
                pass;
        }

 }

 [...]

 }


 Maybe it can be useful to somebody else :)

 cheers
 ___
 varnish-misc mailing list
 varnish-misc@projects.linpro.no
 http://projects.linpro.no/mailman/listinfo/varnish-misc


___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Assert error in VRT_ESI

2010-01-28 Thread Bert-Jan de Lange
Hi everybody,

I'm trying to experiment with ESI but even the simplest setup crashes.
My setup is FreeBSD 7.2, apache 2.2.14, varnish 2.0.6 from ports.

I have a simple page:

index.html
html
esi:include src=/include.html/
/html

include.html
pTest/p

When I open it through Varnish the connection is reset. Requesting 
include.html directly is no problem.

My default.vcl:

backend dev {
   .host = 192.168.2.10;
   .port = 80;
}

sub vcl_recv {
 if (req.url ~ \.(js|css|gif|jpg|png|ico|txt|swf|mp3)(\?.*)?$) {
 unset req.http.cookie;
 }

 if (req.http.Accept-Encoding) {
 if (req.http.Accept-Encoding ~ gzip) {
 set req.http.Accept-Encoding = gzip;
 } elsif (req.http.Accept-Encoding ~ deflate) {
 set req.http.Accept-Encoding = deflate;
 } else {
 # unkown algorithm
 remove req.http.Accept-Encoding;
 }
 }

 if (req.url == /index.html) {
--esi;
 }
}

What happens:

# varnishd -d -d -f /usr/local/etc/varnish/default.vcl -a 192.168.2.15:80
storage_file: filename: ./varnish.2adBfM (unlinked) size 1346836 MB.
Using old SHMFILE
Debugging mode, enter start to start child
start
child (57004) Started
200 0

Child (57004) said Closed fds: 4 8 9 11 12
Child (57004) said Child starts
Child (57004) said managed to mmap 1412260429824 bytes of 1412260429824
Child (57004) said Ready
Child (57004) died signal=6
Child (57004) Panic message: Assert error in VRT_ESI(), cache_vrt_esi.c 
line 658:
   Condition((sp-obj) != NULL) not true.
thread = (cache-worker)
sp = 0x806572008 {
   fd = 9, id = 9, xid = 678967366,
   client = 192.168.2.24:57004,
   step = STP_RECV,
   handling = error,
   restarts = 0, esis = 0
   ws = 0x806572080 {
 id = sess,
 {s,f,r,e} = {0x806572810,+523,0x0,+16384},
   },
   http[req] = {
 ws = 0x806572080[sess]
   GET,
   /index.html,
   HTTP/1.1,
   Host: dutchcowboys.bert-jan.bug,
   User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; 
rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7,
   Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,
   Accept-Language: en-us,en;q=0.5,
   Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7,
   Keep-Alive: 300,
   Connection: keep-alive,
   Cookie: __unam=c4094e2-124e7db5c01-3e94d73-153; 
PHPSESSID=36e043ec7c9710545523e4e04c538734,
   Accept-Encoding: gzip,
   },
   worker = 0x7dff0a70
 vcl = {
   srcname = {
 input,
 Default,
   },
 },
},


Child cleanup complete
child (57005) Started
Child (57005) said Closed fds: 4 8 9 11 12
Child (57005) said Child starts
Child (57005) said managed to mmap 1412260429824 bytes of 1412260429824
Child (57005) said Ready

Any suggestions would be very welcome.

Bert-Jan de Lange

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Memory usage

2010-01-28 Thread Martin Goldman
My backing store is file-based. In any case, thanks to you both -- I have
ordered some more RAM and will see what happens.

Martin



 On Wed, Jan 27, 2010 at 12:23 AM, Michael Fischer mich...@dynamine.netwrote:

 On Tue, Jan 26, 2010 at 7:23 PM, Martin Goldman m...@mgoldman.com wrote:

 I'm running Varnish on a box with 4GB RAM. There are hundreds of thousands
 of objects being served, and I'm certain that they don't all fit in that
 relatively meager amount of RAM. I understand that Varnish's model dictates
 that the kernel will be trusted to use virtual memory as necessary if the
 cached objects don't fit in RAM. I have a few questions about this:

 1. How can you tell whether your Varnish objects fit in RAM?


 You can't guarantee that they will unless you set your cache size at or
 below the amount of RAM you have installed.


 2. If I have objects residing in virtual memory, to what extent will my
 performance be adversely affected? If I want my site to be fast, do I
 basically need to go out and buy as much RAM as it will take so that virtual
 memory isn't needed?


 Technically, it's go out and buy as much RAM as it will take to avoid
 being swamped by paging.  But yes.


  3. I noticed tonight that my machine was using a few hundred megs of
 swap space, which I've never seen happen before. Varnish is the only
 non-system service running on this box. My understanding was that Varnish
 would get only as much RAM as was available and then send the overflow into
 the file-backed virtual memory. If that's the case, though, then why is swap
 space being used? Is this just a side effect of how the kernel allocates
 memory, or is something else going on here?


 Is your backing store file-based, or malloc-based?  If the latter, that
 would explain the swap space being consumed.  Or, as Darryl said, the
 housekeeping overhead of a VERY large file-backed cache could make the
 Varnish process very large.

 --Michael



___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish Prefetch

2010-01-28 Thread Poul-Henning Kamp
In message 75cf5801001270025s722f114ax9335dba334a84...@mail.gmail.com, Paras 
Fadte writes:

Thanks for the response . So with grace mode is it possible to fetch an
object from backend about x seconds before its expires time is reached ?


No, sorry.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish Prefetch

2010-01-28 Thread Paras Fadte
Thanks for the response Poul.


On Fri, Jan 29, 2010 at 3:49 AM, Poul-Henning Kamp p...@phk.freebsd.dkwrote:

 In message 75cf5801001270025s722f114ax9335dba334a84...@mail.gmail.com,
 Paras
 Fadte writes:

 Thanks for the response . So with grace mode is it possible to fetch an
 object from backend about x seconds before its expires time is reached
 ?


 No, sorry.

 --
 Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
 p...@freebsd.org | TCP/IP since RFC 956
 FreeBSD committer   | BSD since 4.3-tahoe
 Never attribute to malice what can adequately be explained by incompetence.

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc