From fabrice at dulaunoy.com Wed Jul 18 11:38:23 2007 From: fabrice at dulaunoy.com (fabrice at dulaunoy.com) Date: Wed, 18 Jul 2007 13:38:23 +0200 (CEST) Subject: Error xxx Guru Meditation Message-ID: Dear all, I have some customer which are complaining about the "design" of the error page generated when all backend server are down. To fix this aesthetical request , I've made a small patch. This patch allow to provide a folder ( by the use of the flag -e /path/to/error_/folder ) where html error page belong. If you provide a 503.html page in this folder, you've got that page in place of the default "Guru meditation" message. May be this patch could be useful for someone else. Best regards and thanks a lot for the varnish product. DULAUNOY Fabrice -------------- next part -------------- A non-text attachment was scrubbed... Name: varnish-1.0.4.diff Type: text/x-diff Size: 13939 bytes Desc: URL: From rudd-o at rudd-o.com Thu Jul 19 14:52:31 2007 From: rudd-o at rudd-o.com (Manuel Amador (Rudd-O)) Date: Thu, 19 Jul 2007 09:52:31 -0500 Subject: Error xxx Guru Meditation In-Reply-To: References: Message-ID: <1184856751.6380.4.camel@karen> I know I'm not exactly persona grata, but I would love for this patch to be considered as well. Just a quick serveup of an HTML file for the client that can be customized by the user. On mi?, 2007-07-18 at 13:38 +0200, fabrice at dulaunoy.com wrote: > Dear all, > > I have some customer which are complaining about the "design" of the > error page generated when all backend server are down. > > To fix this aesthetical request , I've made a small patch. > This patch allow to provide a folder ( by the use of the flag -e > /path/to/error_/folder ) where html error page belong. > If you provide a 503.html page in this folder, you've got that page in > place of the default "Guru meditation" message. > > May be this patch could be useful for someone else. > > Best regards and thanks a lot for the varnish product. > > > DULAUNOY Fabrice > _______________________________________________ varnish-dev mailing list varnish-dev at projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-dev Manuel Amador (Rudd-O) The R Zone - http://rudd-o.com/ GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/ Now playing, courtesy of Amarok: You will be honored for contributing your time and skill to a worthy cause. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From andrearo at pvv.ntnu.no Thu Jul 19 15:13:32 2007 From: andrearo at pvv.ntnu.no (=?ISO-8859-1?Q?Andreas_R=F8sdal?=) Date: Thu, 19 Jul 2007 17:13:32 +0200 (CEST) Subject: Error xxx Guru Meditation In-Reply-To: <1184856751.6380.4.camel@karen> References: <1184856751.6380.4.camel@karen> Message-ID: <20070719170659.F52658@verden.pvv.ntnu.no> > On mi?, 2007-07-18 at 13:38 +0200, fabrice at dulaunoy.com wrote: >> Dear all, >> >> I have some customer which are complaining about the "design" of the >> error page generated when all backend server are down. >> >> To fix this aesthetical request , I've made a small patch. >> This patch allow to provide a folder ( by the use of the flag -e >> /path/to/error_/folder ) where html error page belong. >> If you provide a 503.html page in this folder, you've got that page in >> place of the default "Guru meditation" message. >> >> May be this patch could be useful for someone else. Ideally, when all backend servers are down, varnish should show an old cached version of the requested resource if possible. It would mean that backend failures wouldn't be noticed by end users. Would this be possible, or planned ? - Andreas From rudd-o at rudd-o.com Thu Jul 19 15:27:18 2007 From: rudd-o at rudd-o.com (Manuel Amador (Rudd-O)) Date: Thu, 19 Jul 2007 10:27:18 -0500 Subject: Error xxx Guru Meditation In-Reply-To: <20070719170659.F52658@verden.pvv.ntnu.no> References: <1184856751.6380.4.camel@karen> <20070719170659.F52658@verden.pvv.ntnu.no> Message-ID: <1184858838.6380.13.camel@karen> On jue, 2007-07-19 at 17:13 +0200, Andreas R?sdal wrote: > Ideally, when all backend servers are down, varnish should show an old > cached version of the requested resource if possible. It would mean that > backend failures wouldn't be noticed by end users. Would this be > possible, or planned ? This would also be a good idea but I'd hate to see this be the "default", because it can mask *serious* HTTP backend errors, misleading administrators into believing the site is running OK. At least, it should never trigger if a "Pragma: no-cache" header is sent by the client, so that the ones among us using Wget/munin/nagios to monitor our sites can actually monitor them :-). > > - Andreas Manuel Amador (Rudd-O) The R Zone - http://rudd-o.com/ GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/ Now playing, courtesy of Amarok: Andrea - Time to pray What good is an obscenity trial except to popularize literature? -- Nero Wolfe, "The League of Frightened Men" -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From darix at web.de Mon Jul 23 13:52:03 2007 From: darix at web.de (Marcus Rueckert) Date: Mon, 23 Jul 2007 15:52:03 +0200 Subject: Assert for error handling sucks Message-ID: <20070723135203.GA26939@pixel.global-banlist.de> hi, as the subject says. While i was testing my 1.1 rpms for suse I ran into a "crash" with varnish. I wondered as the error message want really helpful. [[[ $ /usr/sbin/varnishd -f /etc/varnish/vcl.conf -T127.0.0.1:6082 -s file,/var/cache/varnish/ file /var/cache/varnish//varnish.fTZLF4 (unlinked) size 46919348723712 bytes (11454919122 fs-blocks, 11454919122 pages) Assert error in smf_initfile(), storage_file.c line 239: Condition((ftruncate(sc->fd, sc->filesize)) == 0) not true. errno = 27 (File too large) ]]] Can this not be handled more gracefully? For testing i did: [[[ $/usr/sbin/varnishd -f /etc/varnish/vcl.conf -T127.0.0.1:6082 -s file,/var/cache/varnish/,1024 Error: size too small, at least 524288 needed ]]] now i wonder if 524288 is a good default value? what would you suggest for a package default config? with kind regards, darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -------------- next part -------------- (gdb) r Starting program: /usr/sbin/varnishd -f /etc/varnish/vcl.conf -T127.0.0.1:6082 -s file,/var/cache/varnish [Thread debugging using libthread_db enabled] [New Thread 47252503396816 (LWP 25764)] Error while mapping shared library sections: ./bin.XX8mRPjT: No such file or directory. Error while reading shared library symbols: ./bin.XX8mRPjT: No such file or directory. Error while reading shared library symbols: ./bin.XX8mRPjT: No such file or directory. file /var/cache/varnish/varnish.8wVIfz (unlinked) size 47252501147648 bytes (11536255163 fs-blocks, 11536255163 pages) Assert error in smf_initfile(), storage_file.c line 239: Condition((ftruncate(sc->fd, sc->filesize)) == 0) not true. errno = 27 (File too large) Program received signal SIGABRT, Aborted. [Switching to Thread 47252503396816 (LWP 25764)] 0x00002af9d48deaa5 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00002af9d48deaa5 in raise () from /lib64/libc.so.6 #1 0x00002af9d48dfe60 in abort () from /lib64/libc.so.6 #2 0x00002af9d43717fa in lbv_assert (func=0x4303c3 "smf_initfile", file=0x4301b7 "storage_file.c", line=239, cond=0x4303d0 "(ftruncate(sc->fd, sc->filesize)) == 0", err=27) at assert.c:58 #3 0x0000000000424f2c in smf_initfile (sc=0x53d790, size=0x53d0f3 "", newfile=1) at storage_file.c:239 #4 0x0000000000425414 in smf_init (parent=0x53cf80, spec=0x7fffd685659f "/var/cache/varnish") at storage_file.c:334 #5 0x000000000042789a in setup_storage (s_arg=0x7fffd685659a "file,/var/cache/varnish") at varnishd.c:158 #6 0x0000000000428dba in main (argc=0, argv=0x7fffd6854aa8) at varnishd.c:573 (gdb) bt full #0 0x00002af9d48deaa5 in raise () from /lib64/libc.so.6 No symbol table info available. #1 0x00002af9d48dfe60 in abort () from /lib64/libc.so.6 No symbol table info available. #2 0x00002af9d43717fa in lbv_assert (func=0x4303c3 "smf_initfile", file=0x4301b7 "storage_file.c", line=239, cond=0x4303d0 "(ftruncate(sc->fd, sc->filesize)) == 0", err=27) at assert.c:58 No locals. #3 0x0000000000424f2c in smf_initfile (sc=0x53d790, size=0x53d0f3 "", newfile=1) at storage_file.c:239 __func__ = "smf_initfile" #4 0x0000000000425414 in smf_init (parent=0x53cf80, spec=0x7fffd685659f "/var/cache/varnish") at storage_file.c:334 size = 0x53d0f3 "" p = 0x53d0e0 "/var/cache/varnish" q = 0x53d2d0 "" st = {st_dev = 2304, st_ino = 9979057, st_nlink = 3, st_mode = 16872, st_uid = 134, st_gid = 129, pad0 = 0, st_rdev = 0, st_size = 4096, st_blksize = 4096, st_blocks = 8, st_atim = {tv_sec = 1185132340, tv_nsec = 0}, st_mtim = {tv_sec = 1185132397, tv_nsec = 0}, st_ctim = {tv_sec = 1185132397, tv_nsec = 0}, __unused = {0, 0, 0}} sc = (struct smf_sc *) 0x53d790 u = 33 __func__ = "smf_init" #5 0x000000000042789a in setup_storage (s_arg=0x7fffd685659a "file,/var/cache/varnish") at varnishd.c:158 p = 0x7fffd685659e ",/var/cache/varnish" q = 0x7fffd685659f "/var/cache/varnish" stp = (struct stevedore *) 0x536920 __func__ = "setup_storage" #6 0x0000000000428dba in main (argc=0, argv=0x7fffd6854aa8) at varnishd.c:573 o = -1 C_flag = 0 d_flag = 0 F_flag = 0 b_arg = 0x0 f_arg = 0x7fffd6856570 "/etc/varnish/vcl.conf" f_fd = 6 h_arg = 0x430f41 "classic" n_arg = 0x0 P_arg = 0x0 s_arg = 0x7fffd685659a "file,/var/cache/varnish" T_arg = 0x7fffd6856588 "127.0.0.1:6082" p = 0x2af900000001
cli = {{sb = 0x53a010, result = CLIS_OK}} pfh = (struct pidfh *) 0x0 dirname = "/var/cache//varnish/zen\000?Gi??*\000\000pF\205??\177\000\000?Di??*\000\000?y??*\000\000s?%??*\000\001??\213??*\000\000 at Ii??*\000\000?F\205?\000\000\000\000(?6??*\000\000\000 %??*\000\000(?6??*\000\000\a\000\000\000\000\000\000\000&?\226??*\000\000?{\213??*\000\000 at Ii??*\000\000\000\000\000\000\000\000\000\000?\021\021\000\000\000\000\000?H\205??\177\000\000?J\205??\177\000\000xJ\205??\177\000\000\006\000\000\000\000\000\000\000\000\220y??*\000\000"... __func__ = "main" #2 0x00002ac263c957fa in lbv_assert (func=0x4303c3 "smf_initfile", file=0x4301b7 "storage_file.c", line=239, cond=0x4303d0 "(ftruncate(sc->fd, sc->filesize)) == 0", err=27) at assert.c:58 #3 0x0000000000424f2c in smf_initfile (sc=0x53d790, size=0x53d2ec "", newfile=1) at storage_file.c:239 #4 0x0000000000425165 in smf_init (parent=0x53cf80, spec=0x7fff46f32596 "/var/cache/varnish/somefile") at storage_file.c:280 #5 0x000000000042789a in setup_storage (s_arg=0x7fff46f32591 "file,/var/cache/varnish/somefile") at varnishd.c:158 #6 0x0000000000428dba in main (argc=0, argv=0x7fff46f31178) at varnishd.c:573 From santiago.del.castillo at fnbox.com Mon Jul 23 18:31:28 2007 From: santiago.del.castillo at fnbox.com (Santiago Del Castillo) Date: Mon, 23 Jul 2007 15:31:28 -0300 Subject: New with varnis Message-ID: <33d607980707231131ib1fe195lab7424e0433ca2e8@mail.gmail.com> Hi, I'm willing to try varnish on our production environment. Right now I've 5 squids running and serving static files. (1.3 million files ~40k each and counting) I've some questions about varnish and the difference with squid. - Is it possible to set the amount of RAM varnish should use? - Varnish creates a directory tree like the one squid does? - Varnish starts dumping content to disk once memory is full? - '-s' option limits the disk size varnish will use to store files? Nothing else to say (yet) except that varnish seems to be a very good candidate for squid replacement. Cheers! Santiago From phk at phk.freebsd.dk Tue Jul 24 07:50:10 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 24 Jul 2007 07:50:10 +0000 Subject: New with varnis In-Reply-To: Your message of "Mon, 23 Jul 2007 15:31:28 -0300." <33d607980707231131ib1fe195lab7424e0433ca2e8@mail.gmail.com> Message-ID: <21946.1185263410@critter.freebsd.dk> In message <33d607980707231131ib1fe195lab7424e0433ca2e8 at mail.gmail.com>, "Santi ago Del Castillo" writes: >Hi, I'm willing to try varnish on our production environment. Right >now I've 5 squids running and serving static files. (1.3 million files >~40k each and counting) > >I've some questions about varnish and the difference with squid. > >- Is it possible to set the amount of RAM varnish should use? No, Varnish will use whatever is available because Varnish relies on the Virtual Memory system of the kernel to do the RAM/disk scheduling. >- Varnish creates a directory tree like the one squid does? No, just a single file. >- Varnish starts dumping content to disk once memory is full? Depends on the VM strategy of your operating system. In general you shouldn't need to worry about this at all. >- '-s' option limits the disk size varnish will use to store files? Yes. -- 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 rudd-o at rudd-o.com Tue Jul 24 08:17:19 2007 From: rudd-o at rudd-o.com (Manuel Amador (Rudd-O)) Date: Tue, 24 Jul 2007 03:17:19 -0500 Subject: New with varnis In-Reply-To: <21946.1185263410@critter.freebsd.dk> References: <21946.1185263410@critter.freebsd.dk> Message-ID: <1185265039.23239.5.camel@karen> IF I understood Varnish's principle of operation, is that it mmaps a large file -- in effect creating a sort of "RAM backed by disk". Things are flushed periodically, and whenever the computer is low on RAM (memory pressure increases), it starts to remove things from RAM and re-read things from disk as necessary. Certainly makes more sense than the Squid approach. On mar, 2007-07-24 at 07:50 +0000, Poul-Henning Kamp wrote: > In message <33d607980707231131ib1fe195lab7424e0433ca2e8 at mail.gmail.com>, "Santi > ago Del Castillo" writes: > >Hi, I'm willing to try varnish on our production environment. Right > >now I've 5 squids running and serving static files. (1.3 million files > >~40k each and counting) > > > >I've some questions about varnish and the difference with squid. > > > >- Is it possible to set the amount of RAM varnish should use? > > No, Varnish will use whatever is available because Varnish relies > on the Virtual Memory system of the kernel to do the RAM/disk > scheduling. > > >- Varnish creates a directory tree like the one squid does? > > No, just a single file. > > >- Varnish starts dumping content to disk once memory is full? > > Depends on the VM strategy of your operating system. In general > you shouldn't need to worry about this at all. > > >- '-s' option limits the disk size varnish will use to store files? > > Yes. > > Manuel Amador (Rudd-O) The R Zone - http://rudd-o.com/ GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/ Now playing, courtesy of Amarok: You are scrupulously honest, frank, and straightforward. Therefore you have few friends. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From des at linpro.no Tue Jul 24 09:24:42 2007 From: des at linpro.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Tue, 24 Jul 2007 11:24:42 +0200 Subject: Assert for error handling sucks In-Reply-To: <20070723135203.GA26939@pixel.global-banlist.de> (Marcus Rueckert's message of "Mon\, 23 Jul 2007 15\:52\:03 +0200") References: <20070723135203.GA26939@pixel.global-banlist.de> Message-ID: <87ejiy6tnp.fsf@des.linpro.no> Marcus Rueckert writes: > Can this not be handled more gracefully? Sure it can, please send patches :) > now i wonder if 524288 is a good default value? It is an arbitrary minimum. I can't imagine a setup where it would make sense to run with that little cache, though. > what would you suggest for a package default config? I suggest reading the release engineering documentation in the wiki, and subscribing to varnish-dist at projects.linpro.no as you were invited to do a couple of months ago. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From andrearo at pvv.ntnu.no Tue Jul 31 14:37:37 2007 From: andrearo at pvv.ntnu.no (=?ISO-8859-1?Q?Andreas_R=F8sdal?=) Date: Tue, 31 Jul 2007 16:37:37 +0200 (CEST) Subject: Varnish crashes, and Cache child dies Message-ID: <20070731161701.V3904@verden.pvv.ntnu.no> Hello! I was really looking forward to varnish 1.1... We've just upgraded from varnish 1.0.4 to the new 1.1, and now varnish regularily crashes every 60 seconds. The VCL file is available here: http://www.pvv.ntnu.no/~andrearo/vcl.conf The operating system is SuSE Linux 9 x86_64. This is grandis01, for those who have seen this system before.. :) To me it looks like an assertion is triggered in cache_http.c. Here is the output from running varnish in debug mode: /usr/sbin/varnishd -f /etc/varnish/vcl.conf -T127.0.0.1:6082 -s file,/var/cache/varnish -d file /var/cache/varnish/varnish.hswcHe (unlinked) size 5476352 bytes (1337 fs-blocks, 1337 pages) Using old SHMFILE New Pid 10330 rolling(1)... rolling(2)... start CLI start child pid 10351 200 0 Child said (2, 10351): <> Child said (2, 10351): <> Child said (2, 10351): <hd[HTTP_HDR_STATUS].b) != 0) not true. errno = 0 (Success) >> Cache child died pid=10351 status=0x6 Clean child Child cleaned start child pid 10365 Child said (2, 10365): < ("Andreas =?utf-8?Q?R=C3=B8sdal=22's?= message of "Tue\, 31 Jul 2007 16\:37\:37 +0200 \(CEST\)") References: <20070731161701.V3904@verden.pvv.ntnu.no> Message-ID: <874pjkwo0r.fsf@des.linpro.no> Andreas R?sdal writes: >>> > Child said (2, 10351): < 977: > Condition((hp->hd[HTTP_HDR_STATUS].b) != 0) not true. > errno = 0 (Success) >>> This is a known bug, see http://varnish.projects.linpro.no/ticket/128 for an explanation and a patch. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From andrearo at pvv.ntnu.no Tue Jul 31 16:50:28 2007 From: andrearo at pvv.ntnu.no (=?ISO-8859-1?Q?Andreas_R=F8sdal?=) Date: Tue, 31 Jul 2007 18:50:28 +0200 (CEST) Subject: Varnish crashes, and Cache child dies In-Reply-To: <874pjkwo0r.fsf@des.linpro.no> References: <20070731161701.V3904@verden.pvv.ntnu.no> <874pjkwo0r.fsf@des.linpro.no> Message-ID: <20070731184821.V5166@verden.pvv.ntnu.no> On Tue, 31 Jul 2007, [utf-8] Dag-Erling Sm?rgrav wrote: > Andreas R?sdal writes: >>>> >> Child said (2, 10351): <> 977: >> Condition((hp->hd[HTTP_HDR_STATUS].b) != 0) not true. >> errno = 0 (Success) >>>> > > This is a known bug, see http://varnish.projects.linpro.no/ticket/128 > for an explanation and a patch. > > DES Thanks, I'll be trying out Varnish 1.1.1 once that is released then. - Andreas