From varnish+Steven.Murdoch at cl.cam.ac.uk Mon Apr 2 10:10:44 2007 From: varnish+Steven.Murdoch at cl.cam.ac.uk (Steven Murdoch) Date: Mon, 2 Apr 2007 11:10:44 +0100 Subject: Getting useful information from a varnishd crash Message-ID: <20070402101044.GB8634@cl.cam.ac.uk> I've been running varnish-1.0.2 for about a month, and it generally works well, but it has stopped running twice (I presume a crash). Since it only keeps in-memory logs, I am a bit in the dark about what went wrong. What is the best way I could use to find out what the problem is, so I can either fix it or submit a useful bug report? Thanks, Steven. -- w: http://www.cl.cam.ac.uk/users/sjm217/ From cklinger at novareto.de Mon Apr 2 11:34:47 2007 From: cklinger at novareto.de (Christian Klinger) Date: Mon, 02 Apr 2007 13:34:47 +0200 Subject: Varnish install problem on openSUSE 10.2 Message-ID: <4610EA57.2090806@novareto.de> Hi, i try to install varnish on an openSuse 10.2. System. This is my gcc environment: tirpitz:/tmp/varnish/varnish-1.0.3 # gcc -v Using built-in specs. Target: x86_64-suse-linux Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix=-4.1 --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux Thread model: posix gcc version 4.1.2 20061115 (prerelease) (SUSE Linux) and i got these error when i run the make: make[3]: Entering directory `/tmp/varnish/varnish-1.0.3/bin/varnishhist' /bin/sh ../../libtool --tag=CC --mode=link gcc -O2 -pipe -o varnishhist varnishhist-varnishhist.o ../../lib/libcompat/libcompat.a ../../lib/libvarnish/libvarnish.la ../../lib/libvarnishapi/libvarnishapi.la -lm -lcurses -ldl -lrt gcc -O2 -pipe -o .libs/varnishhist varnishhist-varnishhist.o ../../lib/libcompat/libcompat.a ../../lib/libvarnish/.libs/libvarnish.so ../../lib/libvarnishapi/.libs/libvarnishapi.so -lm -lcurses -ldl -lrt -Wl,--rpath -Wl,/opt/varnish/lib /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: cannot find -lcurses collect2: ld returned 1 exit status make[3]: *** [varnishhist] Error 1 make[3]: Leaving directory `/tmp/varnish/varnish-1.0.3/bin/varnishhist' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/varnish/varnish-1.0.3/bin' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/varnish/varnish-1.0.3' make: *** [all] Error 2 maybe someone has an idea. thx christian From darix at web.de Mon Apr 2 13:11:32 2007 From: darix at web.de (Marcus Rueckert) Date: Mon, 2 Apr 2007 15:11:32 +0200 Subject: Varnish install problem on openSUSE 10.2 In-Reply-To: <4610EA57.2090806@novareto.de> References: <4610EA57.2090806@novareto.de> Message-ID: <20070402131132.GV22086@pixel.global-banlist.de> hi, you can find packages for varnish on http://software.opensuse.org/download/server:/http/openSUSE_10.2/ you can add the link as repository to your favorite package manager. [1] if you see any bugs/problems with the rpms please contact me directly. if you still want to build it on your own, see the attached patch. hope this helps darix [1] http://en.opensuse.org/Build_Service/User -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -------------- next part -------------- A non-text attachment was scrubbed... Name: varnish-1.0.1_ncurses.patch Type: text/x-patch Size: 1094 bytes Desc: not available URL: From phk at phk.freebsd.dk Mon Apr 2 15:15:51 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Mon, 02 Apr 2007 15:15:51 +0000 Subject: Getting useful information from a varnishd crash In-Reply-To: Your message of "Mon, 02 Apr 2007 11:10:44 +0100." <20070402101044.GB8634@cl.cam.ac.uk> Message-ID: <4071.1175526951@critter.freebsd.dk> In message <20070402101044.GB8634 at cl.cam.ac.uk>, Steven Murdoch writes: >I've been running varnish-1.0.2 for about a month, and it generally >works well, but it has stopped running twice (I presume a crash). >Since it only keeps in-memory logs, I am a bit in the dark about what >went wrong. If you can reproduce the problem, try running varnishd in the foreground with -d -d options (yes, twice). >What is the best way I could use to find out what the problem is, so I >can either fix it or submit a useful bug report? Do you have a core dump ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at 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. From varnish+Steven.Murdoch at cl.cam.ac.uk Mon Apr 2 16:42:38 2007 From: varnish+Steven.Murdoch at cl.cam.ac.uk (Steven Murdoch) Date: Mon, 2 Apr 2007 17:42:38 +0100 Subject: Getting useful information from a varnishd crash In-Reply-To: <4071.1175526951@critter.freebsd.dk> References: <20070402101044.GB8634@cl.cam.ac.uk> <4071.1175526951@critter.freebsd.dk> Message-ID: <20070402164238.GB22897@cl.cam.ac.uk> On Mon, Apr 02, 2007 at 03:15:51PM +0000, Poul-Henning Kamp wrote: > If you can reproduce the problem, try running varnishd in the foreground > with -d -d options (yes, twice). I don't know how to reproduce it. It last happened at a fairly quiet time, so I don't think it is load related. Perhaps it was some odd HTTP request or unlikely race condition. It could be several weeks before the next crash, so I'm not sure what the performance hit would be if I left it in debug mode permanently. > >What is the best way I could use to find out what the problem is, so I > >can either fix it or submit a useful bug report? > > Do you have a core dump ? Unfortunately core dumps appear to have been disabled by default. I've just enabled them for varnishd and they do seem to be generated on SIGQUIT. Hopefully that will catch it next time around. Thanks, Steven. -- w: http://www.cl.cam.ac.uk/users/sjm217/ From des at linpro.no Wed Apr 4 09:00:18 2007 From: des at linpro.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) Date: Wed, 04 Apr 2007 11:00:18 +0200 Subject: Getting useful information from a varnishd crash In-Reply-To: <20070402101044.GB8634@cl.cam.ac.uk> (Steven Murdoch's message of "Mon, 2 Apr 2007 11:10:44 +0100") References: <20070402101044.GB8634@cl.cam.ac.uk> Message-ID: Steven Murdoch writes: > I've been running varnish-1.0.2 for about a month, and it generally > works well, but it has stopped running twice (I presume a crash). > Since it only keeps in-memory logs, I am a bit in the dark about what > went wrong. > > What is the best way I could use to find out what the problem is, so I > can either fix it or submit a useful bug report? First of all, please upgrade to 1.0.3 before reporting any bugs. Second, you can run 'varnishlog -w filename' to capture complete logs to file. See the varnishlog man page for additional details. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From runyaga at gmail.com Mon Apr 2 13:41:46 2007 From: runyaga at gmail.com (Alan Runyan) Date: Mon, 2 Apr 2007 08:41:46 -0500 Subject: Varnish configuration / (s)maxage Message-ID: Hi guys. We are using varnish very successfully. I would like to give you guys whatever feedback that I can. The Zope/Plone system has a fairly sophisticated control system for interacting with cache servers like Squid or Varnish. And I was under the impression that one of the way people configure Zope/Plone is like this: maxage: 0 smaxage: 604800 expires: in the past proxy-must-revalidate This basically states we want to cache in varnish for a week but never in the browser. This is a control that we use with Squid very successfully. Unfortunately this configuration does not seem to work with varnish well. What I spoke with phk about on #varnish was some mechanism for us to peer into the cache so I can: - Query to see what is cached - See what each entry looks like Early on in one of our configurations incorrect vcl configuration was crashing varnishd. That was kinda ugly. Once it was configured correctly -- all is well. varnish is amazing! I have a lot of feature requests *grin*. But what is important that there is a large community, Zope/Plone that could benefit from this technology. The community is already familiar with complex caching configurations and most large systems use Squid in production. Moving to varnish is a no-brainer. Especially once varnish reaches feature parity with squid. Specifically vary support. cheers alan runyan ~runyaga From des at linpro.no Wed Apr 4 09:49:38 2007 From: des at linpro.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) Date: Wed, 04 Apr 2007 11:49:38 +0200 Subject: Varnish configuration / (s)maxage In-Reply-To: (Alan Runyan's message of "Mon, 2 Apr 2007 08:41:46 -0500") References: Message-ID: "Alan Runyan" writes: > varnish is amazing! I have a lot of feature requests *grin*. But > what is important that there is a large community, Zope/Plone that > could benefit from this technology. The community is already familiar > with complex caching configurations and most large systems use Squid > in production. Moving to varnish is a no-brainer. Especially once > varnish reaches feature parity with squid. Specifically vary support. Thank you for your feedback. I hope Poul-Henning will have time to look into your cache-control issues. As for Zope/Plone integration, we are planning to develop some sort of "best practices" document offering advice for integrating Varnish with various CMS frameworks. If you wish to contribute your experience, contact me off-list and I will set you up with wiki access. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From juan.fco.rodriguez at gmail.com Mon Apr 9 11:39:19 2007 From: juan.fco.rodriguez at gmail.com (Juan Rodriguez) Date: Mon, 9 Apr 2007 13:39:19 +0200 Subject: Does varnish support URL rewriting ? Message-ID: <96b30c400704090439h696a0466p358eb087109c24dd@mail.gmail.com> Hello, Sorry if this is not the right mailing list to ask this kind of newbie question, but I just wanted to know if it is possible to redirect an incoming request to a specific backend and at the same time rewrite the URL. Thanks a lot. -- JFRH -------------- next part -------------- An HTML attachment was scrubbed... URL: From phk at phk.freebsd.dk Mon Apr 9 12:08:30 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Mon, 09 Apr 2007 12:08:30 +0000 Subject: Does varnish support URL rewriting ? In-Reply-To: Your message of "Mon, 09 Apr 2007 13:39:19 +0200." <96b30c400704090439h696a0466p358eb087109c24dd@mail.gmail.com> Message-ID: <17040.1176120510@critter.freebsd.dk> In message <96b30c400704090439h696a0466p358eb087109c24dd at mail.gmail.com>, "Juan Rodriguez" writes: >Sorry if this is not the right mailing list to ask this kind of newbie >question, but I >just wanted to know if it is possible to redirect an incoming request to a >specific >backend and at the same time rewrite the URL. It will be shortly, I have the rewrite code on the bench right now. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at 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. From andrearo at pvv.ntnu.no Thu Apr 12 07:39:55 2007 From: andrearo at pvv.ntnu.no (=?ISO-8859-1?Q?Andreas_R=F8sdal?=) Date: Thu, 12 Apr 2007 09:39:55 +0200 (CEST) Subject: cache/nocache Message-ID: <20070412093918.H60526@verden.pvv.ntnu.no> Hello! How is the cache/nocache object attribute used in the Varnish configuration? Any examples would be very useful. It is described here: http://varnish.projects.linpro.no/svn/trunk/varnish-doc/en/varnish-architecture/article.xml - Andreas R. From denis at zeno.org Fri Apr 20 14:29:18 2007 From: denis at zeno.org (Denis Ahrens) Date: Fri, 20 Apr 2007 16:29:18 +0200 Subject: cachefile Message-ID: Hi Every time I restart varnishd it needs to grab every object again from the backend. Is this intentional because varnishd does not like to save the objects to the disk? I know that varnish should not be restarted, but it happens and then a nice built up cache is empty and needs to fill up again. Denis From phk at phk.freebsd.dk Fri Apr 20 15:06:36 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Fri, 20 Apr 2007 15:06:36 +0000 Subject: cachefile In-Reply-To: Your message of "Fri, 20 Apr 2007 16:29:18 +0200." Message-ID: <52190.1177081596@critter.freebsd.dk> In message , Denis Ahrens writes : >Every time I restart varnishd it needs to grab every object again from >the backend. Is this intentional because varnishd does not like to >save the objects to the disk? > >I know that varnish should not be restarted, but it happens and then >a nice built up cache is empty and needs to fill up again. Well, it's complex tradeoff situation: If your backend is truly terribly, then obviously persistent storage is a good thing. But if your active content is shortlived, then persisitence won't buy you anything because by the time you get back up, it's all expired. Then again, you don't want to hit any backend that hard if you recover from a powerfailure and several varnish[1] come up at the same time. On the other hand, it's not much more fun, if all your varnish machines spends ages revalidating their pesistent storage when they start and on and on it goes. The Varnish solution is that the storage module is pluggable. We currently have two, one for debugging and the one we all know that does non-persistent VM storage. If persistent storage is required, it can be written and plugged in, with all the advantages and disadvantages that it has. All that's missing is analysis and code. Poul-Henning [1] What's the proper plural of "varnish" ? Varnishes ? Varnishen ? Varnisker ? Varnixen ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at 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. From denis at zeno.org Tue Apr 24 14:48:39 2007 From: denis at zeno.org (Denis Ahrens) Date: Tue, 24 Apr 2007 16:48:39 +0200 Subject: vcl and cache-control header Message-ID: <766F093C-6960-4FFB-ACA8-B014184CE85F@zeno.org> Hi I have problems with the following vcl-script: if(req.http.Cache-Control == "max-age=0") { set obj.ttl = 0s; pass; } With this snippet in vcl-hit EVERY obj will get fetched (if there is a Cache-Control header or not). Even when I change the code to if(req.http.Cache-Control == "thiscanbeneverfound") { set obj.ttl = 0s; pass; } EVERY obj is fetched from the backend. Is this a bug or am I doing something wrong? Denis From denis at zeno.org Tue Apr 24 15:00:38 2007 From: denis at zeno.org (Denis Ahrens) Date: Tue, 24 Apr 2007 17:00:38 +0200 Subject: varnishd and gzip Message-ID: Hi I understand that gzip support is not there yet. But is it a wanted behavior that varnish delivers a gzipped object to a client which cannot handle it because varnishd does not look at the encoding headers? Denis From phk at phk.freebsd.dk Tue Apr 24 15:46:54 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 24 Apr 2007 15:46:54 +0000 Subject: varnishd and gzip In-Reply-To: Your message of "Tue, 24 Apr 2007 17:00:38 +0200." Message-ID: <3023.1177429614@critter.freebsd.dk> In message , Denis Ahrens writes : >Hi > >I understand that gzip support is not there yet. But is it a wanted >behavior that varnish delivers a gzipped object to a client which cannot >handle it because varnishd does not look at the encoding headers? wanted bahaviour ? No. right now we don't handle the Vary header. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at 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. From phk at phk.freebsd.dk Tue Apr 24 19:19:45 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 24 Apr 2007 19:19:45 +0000 Subject: vcl and cache-control header In-Reply-To: Your message of "Tue, 24 Apr 2007 16:48:39 +0200." <766F093C-6960-4FFB-ACA8-B014184CE85F@zeno.org> Message-ID: <3947.1177442385@critter.freebsd.dk> In message <766F093C-6960-4FFB-ACA8-B014184CE85F at zeno.org>, Denis Ahrens writes : >Hi > >I have problems with the following vcl-script: > > if(req.http.Cache-Control == "max-age=0") { > set obj.ttl = 0s; > pass; > } Guys, when you quote VCL code, please also tell us which function you do this in... >With this snippet in vcl-hit EVERY obj will get fetched (if there is >a Cache-Control header or not). Even when I change the code to > > if(req.http.Cache-Control == "thiscanbeneverfound") { > set obj.ttl = 0s; > pass; > } > >EVERY obj is fetched from the backend. Sounds bogus, can you please enable the vcl_trace parameter and send me a varnishlog -o output ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at 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. From denis at zeno.org Wed Apr 25 12:17:54 2007 From: denis at zeno.org (Denis Ahrens) Date: Wed, 25 Apr 2007 14:17:54 +0200 Subject: vcl and cache-control header In-Reply-To: <3947.1177442385@critter.freebsd.dk> References: <3947.1177442385@critter.freebsd.dk> Message-ID: <2FE660AF-943E-4D8E-8041-8E34EE354779@zeno.org> Hi On 24.04.2007, at 21:19, Poul-Henning Kamp wrote: > In message <766F093C-6960-4FFB-ACA8-B014184CE85F at zeno.org>, Denis > Ahrens writes > : >> Hi >> >> I have problems with the following vcl-script: >> >> if(req.http.Cache-Control == "max-age=0") { >> set obj.ttl = 0s; >> pass; >> } > > Guys, when you quote VCL code, please also tell us which > function you do this in... sorry, this is in vcl_hit() >> With this snippet in vcl-hit EVERY obj will get fetched (if there is >> a Cache-Control header or not). Even when I change the code to >> >> if(req.http.Cache-Control == "thiscanbeneverfound") { >> set obj.ttl = 0s; >> pass; >> } >> >> EVERY obj is fetched from the backend. > Sounds bogus, can you please enable the vcl_trace parameter > and send me a varnishlog -o output ? I even changed it to this (the x is intentional!): if (req.http.Cache-Controlx == "maxage=0") { error 200 "foo"; } and it does not deliver anymore because the child is dying. Cache child died pid=54760 status=0x8b Clean child Child cleaned start child pid 54761 Child said (2, 54761): < Hi, It seems to me there's a missing #ifndef HAVE_CLOCK_GETTIME in bin/varnishd/cache_backend.c. Trivial patch attached, if at all needed. Thanks, -- Pierre Queinnec Architecte - Zenika http://www.zenika.com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch-cache_backend.c URL: From phk at phk.freebsd.dk Thu Apr 26 06:55:03 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 26 Apr 2007 06:55:03 +0000 Subject: Missing include in cache_backend.c In-Reply-To: Your message of "Thu, 26 Apr 2007 08:36:57 +0200." <46304889.7020404@zenika.com> Message-ID: <13610.1177570503@critter.freebsd.dk> Thanks! In message <46304889.7020404 at zenika.com>, Pierre Queinnec writes: >This is a multi-part message in MIME format. >--------------080501030103010503080708 >Content-Type: text/plain; charset=ISO-8859-1; format=flowed >Content-Transfer-Encoding: 7bit > >Hi, > >It seems to me there's a missing #ifndef HAVE_CLOCK_GETTIME in >bin/varnishd/cache_backend.c. Trivial patch attached, if at all needed. > >Thanks, >-- >Pierre Queinnec >Architecte - Zenika >http://www.zenika.com > > >--------------080501030103010503080708 >Content-Type: text/plain; > name="patch-cache_backend.c" >Content-Transfer-Encoding: 7bit >Content-Disposition: inline; > filename="patch-cache_backend.c" > >Index: bin/varnishd/cache_backend.c >=================================================================== >--- bin/varnishd/cache_backend.c (revision 1367) >+++ bin/varnishd/cache_backend.c (working copy) >@@ -48,6 +48,10 @@ > #include > #include > >+#ifndef HAVE_CLOCK_GETTIME >+#include "compat/clock_gettime.h" >+#endif >+ > #include "heritage.h" > #include "shmlog.h" > #include "cache.h" > > >--------------080501030103010503080708 >Content-Type: text/plain; charset="us-ascii" >MIME-Version: 1.0 >Content-Transfer-Encoding: 7bit >Content-Disposition: inline > >_______________________________________________ >varnish-dev mailing list >varnish-dev at projects.linpro.no >http://projects.linpro.no/mailman/listinfo/varnish-dev > >--------------080501030103010503080708-- > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at 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. From pierre.queinnec at zenika.com Wed Apr 25 22:36:09 2007 From: pierre.queinnec at zenika.com (Pierre Queinnec) Date: Thu, 26 Apr 2007 00:36:09 +0200 Subject: Missing include in cache_backend.c Message-ID: <462FD7D9.500@zenika.com> Hi, It seems to me there's a missing #ifndef HAVE_CLOCK_GETTIME in bin/varnishd/cache_backend.c. Trivial patch attached, if at all needed. Thanks, -- Pierre Queinnec Architecte - Zenika http://www.zenika.com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch-cache_backend.c URL: From des at linpro.no Mon Apr 30 15:45:20 2007 From: des at linpro.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) Date: Mon, 30 Apr 2007 17:45:20 +0200 Subject: vcl and cache-control header In-Reply-To: <2FE660AF-943E-4D8E-8041-8E34EE354779@zeno.org> (Denis Ahrens's message of "Wed, 25 Apr 2007 14:17:54 +0200") References: <3947.1177442385@critter.freebsd.dk> <2FE660AF-943E-4D8E-8041-8E34EE354779@zeno.org> Message-ID: Denis Ahrens writes: > Poul-Henning Kamp writes: > > Denis Ahrens writes: > > > I have problems with the following vcl-script: > > > > > > if(req.http.Cache-Control == "max-age=0") { > > > set obj.ttl = 0s; > > > pass; > > > } > > Guys, when you quote VCL code, please also tell us which > > function you do this in... > sorry, this is in vcl_hit() OK, I'm not sure we've ever tested going from hit to pass, although it's meant to work. Could you please open a ticket about this? Call it "returning pass from vcl_hit crashes the child" or something. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no