From perbu at varnish-software.com Wed Aug 1 07:03:10 2012 From: perbu at varnish-software.com (Per Buer) Date: Wed, 1 Aug 2012 09:03:10 +0200 Subject: Varnish API In-Reply-To: References: Message-ID: Hi, On Fri, Jul 6, 2012 at 8:27 PM, Abhishek Chanda wrote: > Hi all, > > I have a network where a number of instances of Varnish are deployed. > I need to have a directory of all files cached at any given moment. > Does Varnish export an API that I can call from my code and query > Varnish for the contents of it's cache? Is there a better way to do > this? > No. You can't query Varnish for a list of content. Also, there is not built in web based API, only a C api which I think has any documentation at the moment. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Wed Aug 1 07:06:23 2012 From: perbu at varnish-software.com (Per Buer) Date: Wed, 1 Aug 2012 09:06:23 +0200 Subject: High CPU usage when using ban with HTTP PURGE In-Reply-To: References: <20120726093611.GB31786@yankee.samfundet.no> Message-ID: Hi, On Mon, Jul 30, 2012 at 1:04 PM, Connor Walls wrote: > So the problem I'm having is purging all variations of the file based on > "Accept" and "X-Forwarded-Proto" headers, as well as the host. Is this > something that is even possible? I personally wouldn't have thought so but > after seeing in the documentation ( > https://www.varnish-cache.org/docs/trunk/tutorial/purging.html): "The > purge in vcl_miss is necessary to purge all variants in the cases where you > hit an object, but miss a particular variant." Seems to imply that this > functionality is present but I can't find any more documentation on how it > works. Do I need to remove the hash_data() calls in vcl_hash and instead > include "Accept" and "X-Forwarded-Proto" in the "Vary" header coming from > the backend server? > Yes. That is the way it is suppose to work. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Wed Aug 1 07:15:10 2012 From: perbu at varnish-software.com (Per Buer) Date: Wed, 1 Aug 2012 09:15:10 +0200 Subject: RAM usage beyond specified amount In-Reply-To: <61E9173DF681274790BA29C89A72200C0267EF92@ksopexchm02.pme.penton.com> References: <61E9173DF681274790BA29C89A72200C0267EF92@ksopexchm02.pme.penton.com> Message-ID: Hi, On Fri, Jun 22, 2012 at 8:42 PM, Crowder, Travis wrote: > I recall seeing on the mailing list before a reason why Varnish would > use more RAM than allocated due to storing something outside of the defined > allocated memory.**** > > ** ** > > For example, I have a box that is allocated 6G of RAM, but it is using > about 12G virtual memory. > Don't worry about virtual memory usage. It?s not real, it?s virtual. > **** > > ** ** > > >top**** > > 9101 nobody 20 0 11.7g 6.8g 81m S 6.0 88.5 1270:21 varnishd**** > > ** ** > > Varnish is invoked via:**** > > /usr/local/sbin/varnishd -f /usr/local/etc/varnish/default.vcl -s > malloc,6G -T xxx.xxx.xxx.xxx:2000 -a :80**** > > ** ** > > Does anyone know what I am talking about? > You allocate 6G to the malloc backend. In addition Varnish needs memory for itself and data structures (1kb per object, more or less). -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From enno at tty.nl Wed Aug 1 12:46:33 2012 From: enno at tty.nl (Enno van Amerongen) Date: Wed, 01 Aug 2012 14:46:33 +0200 Subject: Sharding with Varnish Message-ID: <50192529.6010808@tty.nl> Hey guys, I was wondering if any of you have implemented sharding using varnish. We're considering the following setup: Let's say we have 3 shards, where each shard consists of 2 servers. So this would mean 3 directors with 2 backends each. In VCL I want to determine which shard to use, using a simple ID mod N. 1. Client requests a file 2. Cache Miss 3. Calculate which shard must handle the request 4. Set backend to correct shard 5. Serve the file I'm pretty confident this setup works, the only complicated issue is determining the correct shard. Has anyone done anything like that yet? With inline C it shouldn't be too hard, or maybe someone has already written a VMOD? Any examples would be greatly appreciated. Thanks in advance Enno van Amerongen From phk at phk.freebsd.dk Wed Aug 1 15:46:10 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Wed, 01 Aug 2012 15:46:10 +0000 Subject: Sharding with Varnish In-Reply-To: Your message of "Wed, 01 Aug 2012 14:46:33 +0200." <50192529.6010808@tty.nl> Message-ID: <75298.1343835970@critter.freebsd.dk> In message <50192529.6010808 at tty.nl>, Enno van Amerongen writes: >3. Calculate which shard must handle the request Look at the "hash" director. You can also implement your own algorithm in a VMOD -- 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 nsabbi at officinedigitali.it Wed Aug 1 16:25:34 2012 From: nsabbi at officinedigitali.it (nicola sabbi) Date: Wed, 1 Aug 2012 18:25:34 +0200 Subject: Help with caching and failover Message-ID: Hi, I'm trying to configure varnish 3.0.1 as a failover cache in front of a web server running EZ publish. What I'd like to do is to let varnish cache pages for up to 4 hours. If the backend server is seen sick it should serve the last cached page for the current request (if available), otherwise serve an error page. The backend polling code is working fine, but every time I tamper with the test page returning a 404 error code (in order to force the sick mode) varnish returns a 503 error to the client instead of the cached content, even though the cache is populated (or so I assume). The configuration code I'm using is the following: backend default { .host = "192.168.0.66"; .port = "80"; .probe = { .url = "http://backend/test.php"; .timeout = 10s; .interval = 5s; .window = 3; .threshold = 3; .expected_response=200; } } sub vcl_recv { if (req.backend.healthy) { set req.grace = 30m; } else { set req.grace = 4h; } #return(lookup); } sub vcl_fetch { set beresp.grace = 8h; # return(restart); } sub vcl_error { set obj.http.Content-Type = "text/html; charset=utf-8"; set obj.http.Retry-After = "5"; synthetic {" Unavailable page! "}; return (deliver); } Please, can you explain me what's missing or wrong with this configuration? Thanks, Nico -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.tailor at gmail.com Wed Aug 1 16:35:35 2012 From: nick.tailor at gmail.com (Nick Tailor) Date: Wed, 1 Aug 2012 09:35:35 -0700 Subject: Help with caching and failover In-Reply-To: References: Message-ID: <394B813A-65BD-4243-A8FF-056EEA4482EA@gmail.com> Your missing set beresp.ttl Cheers Nick Tailor Sent from my iPhone On Aug 1, 2012, at 9:25 AM, nicola sabbi wrote: > Hi, > I'm trying to configure varnish 3.0.1 as a failover cache in front of a web server running EZ publish. > What I'd like to do is to let varnish cache pages for up to 4 hours. If the backend server is seen sick it should serve the last cached page for the current request (if available), otherwise serve an error page. > > The backend polling code is working fine, but every time I tamper with the test page returning a 404 error code (in order to force the sick mode) varnish returns a 503 error to the client instead of the cached content, even though the cache is populated (or so I assume). > > The configuration code I'm using is the following: > > > backend default { > .host = "192.168.0.66"; > .port = "80"; > .probe = { > .url = "http://backend/test.php"; > .timeout = 10s; > .interval = 5s; > .window = 3; > .threshold = 3; > .expected_response=200; > } > } > > sub vcl_recv { > if (req.backend.healthy) { > set req.grace = 30m; > } else { > set req.grace = 4h; > } > #return(lookup); > } > > sub vcl_fetch { > set beresp.grace = 8h; > # return(restart); > } > > > > sub vcl_error { > set obj.http.Content-Type = "text/html; charset=utf-8"; > set obj.http.Retry-After = "5"; > synthetic {" > Unavailable page! > "}; > return (deliver); > } > > Please, can you explain me what's missing or wrong with this configuration? > Thanks, > Nico > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc -------------- next part -------------- An HTML attachment was scrubbed... URL: From oddur at ccpgames.com Wed Aug 1 19:04:50 2012 From: oddur at ccpgames.com (=?iso-8859-1?Q?Oddur_Sn=E6r_Magn=FAsson?=) Date: Wed, 1 Aug 2012 19:04:50 +0000 Subject: Trying multiple backends for a resource Message-ID: I?ve got multiple backends which each might have the file I?m requesting. Would it be possible to configure varnish in such a way that is tries multiple backends and uses the first one it finds with a 200 response ? Best regards, Oddur Sn?r Magn?sson Senior Programmer | Reykjav?k | Iceland [Description: Description: Description: Description: cid:DB5C0F43-387B-4CF8-BC6F-B17512BB8251 at ccp.ad.local] :wq -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 10333 bytes Desc: image001.png URL: From enno at tty.nl Wed Aug 1 19:46:22 2012 From: enno at tty.nl (Enno van Amerongen) Date: Wed, 01 Aug 2012 21:46:22 +0200 Subject: Sharding with Varnish In-Reply-To: <75298.1343835970@critter.freebsd.dk> Message-ID: <20120801194622.65a7ab00@groupware.tty.nl> From: Poul-Henning Kamp [mailto:phk at phk.freebsd.dk] In message <50192529.6010808 at tty.nl>, Enno van Amerongen writes: >3. Calculate which shard must handle the request Look at the "hash" director. The problem with the hash director in my case is, is that I think it's hard to predict, if possible at all. I need to know on which servers to store which files. You can also implement your own algorithm in a VMOD I think that's the direction for us, so that we can control the dispatching to several clusters of backends by an id somewhere in the url. Funny that we discussed VMODs at VUG2 in Amsterdam before they existed ;) Been a Varnish fanboy ever since, it's done wonders for me (and billions of requests). Excellent job mate! Enno -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Wed Aug 1 19:53:50 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Wed, 1 Aug 2012 21:53:50 +0200 Subject: Purge command failed any hint ? Message-ID: I have varnish 3 .. got this varnishadm -T 127.0.0.1:6082 purge req.url == "/" -S /etc/varnish/secret Unknown request. Type 'help' for more info. Command failed with error code 101 in help purge command is not there I tried the following http://giantdorks.org/alain/a-shell-script-to-refresh-a-predefined-set-of-pages-in-varnish-cache/ any hint please ? Zeeshan -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Wed Aug 1 19:56:34 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Wed, 1 Aug 2012 21:56:34 +0200 Subject: Purge command failed any hint ? In-Reply-To: References: Message-ID: Got it . Varnish 3, the purge command was renamed to ban. Zee On Wed, Aug 1, 2012 at 9:53 PM, Zeeshan Ali Shah wrote: > I have varnish 3 .. > > got this > > varnishadm -T 127.0.0.1:6082 purge req.url == "/" -S /etc/varnish/secret > Unknown request. > Type 'help' for more info. > > Command failed with error code 101 > > > in help purge command is not there > > I tried the following > http://giantdorks.org/alain/a-shell-script-to-refresh-a-predefined-set-of-pages-in-varnish-cache/ > > any hint please ? > > > Zeeshan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hugo.cisneiros at gmail.com Wed Aug 1 20:04:10 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Wed, 1 Aug 2012 17:04:10 -0300 Subject: Trying multiple backends for a resource In-Reply-To: References: Message-ID: On Wed, Aug 1, 2012 at 4:04 PM, Oddur Sn?r Magn?sson wrote: > I?ve got multiple backends which each might have the file I?m requesting. > > Would it be possible to configure varnish in such a way that is tries multiple backends and uses the first one it finds with a 200 response ? Maybe using restarts... sub vcl_recv { if (req.http.fallbackmarker) { if (req.restarts == 1) { set req.backend = backend_one; } elsif (req.restarts == 2) { set req.backend = backend_two; } elsif (req.restarts == 3) { set req.backend = backend_two; } [...] } } sub vcl_fetch { if (req.url == "/file.ext" && beresp.status != 200) { set req.http.fallbackmarker = 1; return (restart); } } And setting option max_restarts to the number of backends you may use. -- []'s Hugo www.devin.com.br From zeeshan at infoshield.info Wed Aug 1 20:04:39 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Wed, 1 Aug 2012 22:04:39 +0200 Subject: Ban url does not work Message-ID: Hi, I tried ban instead of purge since it is obsolete in 3 but still data coming old . any hint ? i used the script from below BR Zeeshan v-purge-common #!/bin/bash cmd="sudo varnishadm -T 127.0.0.1:6082 -S /etc/varnish/secret" site="http://www.xyx.com" pages=" / /feed/ /feed/atom/ " echo ----------------------------- echo Purging old pages from cache echo ----------------------------- for page in $pages; do # $cmd ban.url "^$page\$" | sed '/^$/d' $cmd ban.url "$site$page\$" | sed '/^$/d' $cmd ban.list | head -n 1 done echo --------------------------------------- echo Populating cache with new page content echo --------------------------------------- for page in $pages; do curl -sL -w "%{http_code} %{url_effective}\n" $site/$page -o /dev/null done -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Wed Aug 1 22:54:15 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Thu, 2 Aug 2012 00:54:15 +0200 Subject: Ban url does not work In-Reply-To: References: Message-ID: Found this working .. #!/bin/bash cmd="sudo varnishadm -T 127.0.0.1:6082 -S /etc/varnish/secret" site="www.xyz.com" pages=" / /feed/ /feed/atom/ " echo ----------------------------- echo Purging old pages from cache echo ----------------------------- #for page in $pages; do # $cmd ban.url "^$page\$" | sed '/^$/d' #$cmd ban.url "$site$page\$" | sed '/^$/d' $cmd ban req.http.host == "$site" $cmd ban.list | head -n 1 #done echo --------------------------------------- echo Populating cache with new page content echo --------------------------------------- #for page in $pages; do # Remove for loop in case of single site curl -sL -w "%{http_code} %{url_effective}\n" $site -o /dev/null #done On Wed, Aug 1, 2012 at 10:04 PM, Zeeshan Ali Shah wrote: > Hi, I tried ban instead of purge since it is obsolete in 3 but still data > coming old . any hint ? i used the script from below > > BR > > Zeeshan > > v-purge-common > > #!/bin/bash > > cmd="sudo varnishadm -T 127.0.0.1:6082 -S /etc/varnish/secret" > site="http://www.xyx.com" > pages=" > / > /feed/ > /feed/atom/ > " > > echo ----------------------------- > echo Purging old pages from cache > echo ----------------------------- > for page in $pages; do > # $cmd ban.url "^$page\$" | sed '/^$/d' > $cmd ban.url "$site$page\$" | sed '/^$/d' > $cmd ban.list | head -n 1 > done > > echo --------------------------------------- > echo Populating cache with new page content > echo --------------------------------------- > for page in $pages; do > curl -sL -w "%{http_code} %{url_effective}\n" $site/$page -o /dev/null > done > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Thu Aug 2 11:33:53 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Thu, 2 Aug 2012 13:33:53 +0200 Subject: Using varnish with File instead of malloc Message-ID: hi, I am planning to use Varnish as edge routers where Large media files 40 MB to 400 MB served. there are around 100 files at one time shd be cached. I am thinking to tune varnish for using File as cache instead of malloc ? since disk space is cheap than RAM. 2nd, I think we cannot run same varnish with different Cache type(File, Malloc) depends on backend or url .. (may be i am wrong) any suggestion ? BR Zeeshan -------------- next part -------------- An HTML attachment was scrubbed... URL: From oddur at ccpgames.com Thu Aug 2 11:55:47 2012 From: oddur at ccpgames.com (=?iso-8859-1?Q?Oddur_Sn=E6r_Magn=FAsson?=) Date: Thu, 2 Aug 2012 11:55:47 +0000 Subject: Trying multiple backends for a resource In-Reply-To: References: Message-ID: Seems like the fallback director is what I want, if I can get it to try to continue trying on 404. I could possibly map 404 to 503(temp unavailable) https://www.varnish-cache.org/docs/trunk/reference/vcl.html#the-fallback-director From: rzuidhof at gmail.com [mailto:rzuidhof at gmail.com] On Behalf Of Richard Zuidhof Sent: Wednesday, August 01, 2012 7:26 PM To: Oddur Sn?r Magn?sson Subject: Re: Trying multiple backends for a resource No problem at all. Op 1 aug. 2012 21:06 schreef "Oddur Sn?r Magn?sson" > het volgende: I?ve got multiple backends which each might have the file I?m requesting. Would it be possible to configure varnish in such a way that is tries multiple backends and uses the first one it finds with a 200 response ? Best regards, Oddur Sn?r Magn?sson Senior Programmer | Reykjav?k | Iceland [Description: Description: Description: Description: cid:DB5C0F43-387B-4CF8-BC6F-B17512BB8251 at ccp.ad.local] :wq _______________________________________________ varnish-misc mailing list varnish-misc at varnish-cache.org https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 10333 bytes Desc: image001.png URL: From enno at tty.nl Thu Aug 2 13:37:09 2012 From: enno at tty.nl (Enno van Amerongen) Date: Thu, 02 Aug 2012 15:37:09 +0200 Subject: Trying multiple backends for a resource In-Reply-To: References: Message-ID: <501A8285.2050304@tty.nl> On 08/02/2012 01:55 PM, Oddur Sn?r Magn?sson wrote: > > Seems like the fallback director is what I want, if I can get it to > try to continue trying on 404. > > I could possibly map 404 to 503(temp unavailable) > > https://www.varnish-cache.org/docs/trunk/reference/vcl.html#the-fallback-director > > the fallback director means that your secondairy backends don't get any requests, unless the first backend is unhealthy. I'm not sure if that's what you want. I'm using the following setup to allow retries on different backends: director cluster1 random { { .backend = backend1; .weight = 10; } { .backend = backend2; .weight = 10; } ... } sub vcl_recv { ... set req.backend = cluster1; ... } sub vcl_fetch { if (! beresp.cacheable) { if (beresp.status == 404 || beresp.status == 500 || beresp.status == 503) { if (req.restarts < 3) { return (restart); } } return (pass); } return (deliver); } Enno -------------- next part -------------- An HTML attachment was scrubbed... URL: From apj at mutt.dk Thu Aug 2 13:45:32 2012 From: apj at mutt.dk (Andreas Plesner Jacobsen) Date: Thu, 2 Aug 2012 15:45:32 +0200 Subject: Trying multiple backends for a resource In-Reply-To: References: Message-ID: <20120802134532.GN24123@nerd.dk> On Wed, Aug 01, 2012 at 07:04:50PM +0000, Oddur Sn?r Magn?sson wrote: > > Would it be possible to configure varnish in such a way that is tries > multiple backends and uses the first one it finds with a 200 response ? Use saint mode and restarts. Remember to set saintmode_threshold to something appropriate though. -- Andreas From oddur at ccpgames.com Thu Aug 2 15:07:57 2012 From: oddur at ccpgames.com (=?iso-8859-1?Q?Oddur_Sn=E6r_Magn=FAsson?=) Date: Thu, 2 Aug 2012 15:07:57 +0000 Subject: Ranged Backend Requests for WAN acceleration Message-ID: Hello, We are evaluating varnish to build an internal content delivery network for our company. We have big http resources which we need to accelerate the delivery of from backend which have really high latency. To work around the latency issue we?d like to use ranged http requests to request the resource in multiple ranged chunks. Would it be possible to have varnish request the resource from the backend in multiple concurrent chunks from the backend ? I?ve found this way of doing this: http://devblog.seomoz.org/2011/05/how-to-cache-http-range-requests/ which would work for us if the http client always requests the same ranges, which we cannot guarantee. The workflow I?m looking for is: 1. Client makes a request to varnish for a resource 2. In the case of a cache miss varnish does a vcl_fetch 3. The vcl_fetch uses multiple ranged requests to the backend for the resource and merges them into one cache entry and serves to the client. I should note that we are using the streaming support as well. Best regards, Oddur Sn?r Magn?sson Senior Programmer | Reykjav?k | Iceland [Description: Description: Description: Description: cid:DB5C0F43-387B-4CF8-BC6F-B17512BB8251 at ccp.ad.local] :wq -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 10333 bytes Desc: image001.png URL: From nsabbi at officinedigitali.it Thu Aug 2 16:30:18 2012 From: nsabbi at officinedigitali.it (nicola sabbi) Date: Thu, 2 Aug 2012 18:30:18 +0200 Subject: Help with caching and failover In-Reply-To: <394B813A-65BD-4243-A8FF-056EEA4482EA@gmail.com> References: <394B813A-65BD-4243-A8FF-056EEA4482EA@gmail.com> Message-ID: Hi, I modified vcl_fetch as follows: sub vcl_fetch { set beresp.grace = 8h; set beresp.ttl = 8h; # return(restart); } but still Varnish is not showing cached content when the polling page goes down. May it have to do with the headers sent by EZ? HTTP/1.1 200 OK Server: Apache/2.2.14 (Ubuntu) Expires: Mon, 26 Jul 1997 05:00:00 GMT Last-Modified: Thu, 02 Aug 2012 16:26:26 GMT Cache-Control: no-cache, must-revalidate Pragma: no-cache X-Powered-By: eZ Publish Served-by: xxxxxxxxxx Content-language: it-IT Vary: Accept-Encoding Content-Type: text/html; charset=utf-8 Date: Thu, 02 Aug 2012 16:26:26 GMT X-Varnish: 447384858 Age: 0 Via: 1.1 varnish Connection: close Since the expiration date is always in the past and the last-modified header is always set to now() I added unset beresp.http.expires; at the very beginning of vcl_fetch, but I didn't get any improvement. Thanks, Nico -------------- next part -------------- An HTML attachment was scrubbed... URL: From tfheen at varnish-software.com Fri Aug 3 08:06:31 2012 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Fri, 3 Aug 2012 10:06:31 +0200 Subject: Using varnish with File instead of malloc In-Reply-To: References: Message-ID: <20120803080631.GA27716@err.no> ]] Zeeshan Ali Shah > 2nd, I think we cannot run same varnish with different Cache type(File, > Malloc) depends on backend or url .. (may be i am wrong) You can specify which stevedore to use in VCL by setting beresp.storage. -- Tollef Fog Heen Technical lead, Varnish Software t: +47 21 98 92 64 From zeeshan at infoshield.info Fri Aug 3 09:05:28 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Fri, 3 Aug 2012 11:05:28 +0200 Subject: Using varnish with File instead of malloc In-Reply-To: <20120803080631.GA27716@err.no> References: <20120803080631.GA27716@err.no> Message-ID: but is'nt this specieid in startup script with -s flag ? Zee On Fri, Aug 3, 2012 at 10:06 AM, Tollef Fog Heen < tfheen at varnish-software.com> wrote: > ]] Zeeshan Ali Shah > > > 2nd, I think we cannot run same varnish with different Cache type(File, > > Malloc) depends on backend or url .. (may be i am wrong) > > You can specify which stevedore to use in VCL by setting beresp.storage. > > -- > Tollef Fog Heen > Technical lead, Varnish Software > t: +47 21 98 92 64 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at dougware.net Fri Aug 3 14:17:35 2012 From: admin at dougware.net (Doug Eubanks) Date: Fri, 3 Aug 2012 10:17:35 -0400 Subject: Varnish is not always adding X-Forwarded-For Message-ID: We need Varnish to always add X-Forwarded-For so that we can see the visitor's IP when they submit a poll answer. We have this setup, but we are still seeing about half of our requests not include the X-Forwarded-For header. sub vcl_pipe { set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For; set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", ", "); set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", client.ip); set req.http.connection = "close"; } Sincerely, Doug Eubanks admin at dougware.net K1DUG (919) 201-8750 -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Mon Aug 6 23:53:19 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Tue, 7 Aug 2012 01:53:19 +0200 Subject: Regex question Message-ID: Hi, sorry it is more related with regex .. any hint ? I want all domain starting from cdn to use certain backend. no matter what the tld is for example all : cdn.xy.asda.com cdn.sda.com cdn.cdad.asda.ada.ad.net what is the suitable regex for above? thanks in advance BR Zeeshan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.hursey at adrevolution.com Tue Aug 7 00:13:12 2012 From: jonathan.hursey at adrevolution.com (Jonathan Hursey) Date: Mon, 6 Aug 2012 19:13:12 -0500 Subject: Regex question In-Reply-To: References: Message-ID: if (req.http.host == ('^(cdn)\..+\.+') { set req.backened = cdnserver } Something like that will work On Mon, Aug 6, 2012 at 6:53 PM, Zeeshan Ali Shah wrote: > Hi, sorry it is more related with regex .. any hint ? > > I want all domain starting from cdn to use certain backend. no matter > what the tld is for example all : > > cdn.xy.asda.com > cdn.sda.com > cdn.cdad.asda.ada.ad.net > > > what is the suitable regex for above? > > > thanks in advance > BR > > > Zeeshan > > > > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mtessar at technicalreality.com Tue Aug 7 16:46:24 2012 From: mtessar at technicalreality.com (Matt Tessar) Date: Tue, 7 Aug 2012 10:46:24 -0600 Subject: Performance for an Amazon Large Instance with Varnish Message-ID: Hello, I have a small number of ( < 500 ) of small files ( a few kb ) that I need to serve up at a very large scale. Per request charges at a CDN like Cloudfront are too much, so I am looking into Varnish to serve them up. What kind of performance could I expect from an amazon large dedicated only to this task with Varnish and Apache? Thanks Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From hugo.cisneiros at gmail.com Tue Aug 7 20:42:43 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Tue, 7 Aug 2012 17:42:43 -0300 Subject: Performance for an Amazon Large Instance with Varnish In-Reply-To: References: Message-ID: On Tue, Aug 7, 2012 at 1:46 PM, Matt Tessar wrote: > I have a small number of ( < 500 ) of small files ( a few kb ) that I need > to serve up at a very large scale. Per request charges at a CDN like > Cloudfront are too much, so I am looking into Varnish to serve them up. > What kind of performance could I expect from an amazon large dedicated only > to this task with Varnish and Apache? If they're static items and if you use malloc as cache storage, you should be limited only by the instance's bandwidth. The performance is very, very good. With one large instance here, I can serve thousands of requests per second on dynamic items (fetched through WAN) and the CPU use averages on 20% only. An instance here goes up to 200Mbit/s, but it varies since network badnwidth is kind of shared on Amazon's Hypervisors. With local files and memory storage you should be really fine. -- []'s Hugo www.devin.com.br From hugo.cisneiros at gmail.com Tue Aug 7 20:45:27 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Tue, 7 Aug 2012 17:45:27 -0300 Subject: Regex question In-Reply-To: References: Message-ID: On Mon, Aug 6, 2012 at 9:13 PM, Jonathan Hursey wrote: > if (req.http.host == ('^(cdn)\..+\.+') > { > set req.backened = cdnserver > } Use the "~" symbol when using regex while comparing[1]. This should work: if (req.http.host ~ "^cdn\.") { set req.backend = be_cdnserver; } [1] https://www.varnish-cache.org/docs/3.0/reference/vcl.html -- []'s Hugo www.devin.com.br From jonathan.hursey at adrevolution.com Tue Aug 7 20:48:24 2012 From: jonathan.hursey at adrevolution.com (Jonathan Hursey) Date: Tue, 7 Aug 2012 15:48:24 -0500 Subject: Regex question In-Reply-To: References: Message-ID: oops... I knew that On Tue, Aug 7, 2012 at 3:45 PM, Hugo Cisneiros (Eitch) < hugo.cisneiros at gmail.com> wrote: > On Mon, Aug 6, 2012 at 9:13 PM, Jonathan Hursey > wrote: > > if (req.http.host == ('^(cdn)\..+\.+') > > { > > set req.backened = cdnserver > > } > > Use the "~" symbol when using regex while comparing[1]. > > This should work: > > if (req.http.host ~ "^cdn\.") { > set req.backend = be_cdnserver; > } > > [1] https://www.varnish-cache.org/docs/3.0/reference/vcl.html > > -- > []'s > Hugo > www.devin.com.br > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogonistic at gmail.com Wed Aug 8 23:03:22 2012 From: vogonistic at gmail.com (Kent Karlsson) Date: Wed, 8 Aug 2012 16:03:22 -0700 Subject: Enforce 503 caching in 3 (beresp.ttl =?utf-8?Q?=3D_?=beresp.Cache-Control.max-age) Message-ID: <65020A057D3A42ADAEF707DF4CB88F74@gmail.com> We have a service that returns 503 errors with Cache-Control: max-age=X. In Varnish 2 it was easy to get it to cache and get the appropriate ttl with a block like this: sub vcl_fetch { if (beresp.status == 503) { set beresp.cacheable = true; } } Now that beresp.cacheable is removed in varnish 3, how do I set beresp.ttl to the contents of Cache-Control: max-age? This is the best I've come up with so far, but it doesn't take Age into account and it's a bit ugly in my opinion: if (beresp.status == 503 && beresp.http.Cache-Control ~ "max-age") { set beresp.ttl = std.duration(regsub(beresp.http.Cache-Control, "^.*max-age=([0-9]+).*$", "\1s"), 1s); } Does anyone have a better solution? -- kent From connor.walls at skillpages.com Fri Aug 10 08:49:22 2012 From: connor.walls at skillpages.com (Connor Walls) Date: Fri, 10 Aug 2012 09:49:22 +0100 Subject: Adding header depending on if request was fetched or passed Message-ID: Hi all, So, as it stands we have the fairly common set up in our vcl_deliver to add a header to indicate whether or not the object was served from cache or not: if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; } else { set resp.http.X-Cache = "MISS"; } Now, in addition to this, I was wondering if it would be possible to add a header to indicate whether or not we attempted to fetch the object from cache, i.e. if the request had gone through vcl_fetch or vcl_pass. My initial thought was to add some form of header in those subroutines but obviously I'm not able to access resp here. Is there anything that obj would be able to tell me in vcl_deliver about this? Thanks for any help, Connor From oddur at ccpgames.com Fri Aug 10 11:00:51 2012 From: oddur at ccpgames.com (=?iso-8859-1?Q?Oddur_Sn=E6r_Magn=FAsson?=) Date: Fri, 10 Aug 2012 11:00:51 +0000 Subject: Remote access to varnish stats / nagios and varnish Message-ID: Hi, I want to monitor some varnishstats (cache hits/misses/bandwith) from my varnish instances with nagios. I've found this https://github.com/varnish/varnish-nagios/commits/master but it seems you are running varnish and nagios on the same machine (or using a npre agent on the varnish box). What would be ideal for me is to expose a single url that just responds with counter values, possibly just the full output of "varnishstat -x". Very similar to http://wiki.nginx.org/NginxHttpStubStatusModule for nginx. If it's possible to access to counter values using inline C, I guess this would be possible using that. Best regards, Oddur Sn?r Magn?sson Senior Programmer | Reykjav?k | Iceland [Description: Description: Description: Description: cid:DB5C0F43-387B-4CF8-BC6F-B17512BB8251 at ccp.ad.local] :wq -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 10333 bytes Desc: image001.png URL: From rowan at jetboy.co.uk Fri Aug 10 13:01:06 2012 From: rowan at jetboy.co.uk (Rowan @ Jetboy) Date: Fri, 10 Aug 2012 14:01:06 +0100 Subject: Conditional logging of X-Fowarded-For in varnishncsa In-Reply-To: References: Message-ID: <001901cd76f8$34b4e610$9e1eb230$@co.uk> With the setup: SSL traffic > nginx > Varnish (for load balancing) > Backend Apache Non-SSL traffic > Varnish > Backend Apache varnishncsa with a custom log format For non-SSL traffic, the IP of the originating request gets logged by varnishncsa as %h; for the SSL traffic it's 127.0.0.1. I can pass the IP from nginx in the X-Forwarded-For header and pick it up in varnishncsa as %{X-Forwarded-For}i. I'd like to log the contents of %{X-Forwarded-For}i if it exists, *OR* %h if it doesn't. Seemingly, the -f command line argument will enable this, but not with a custom format set with the -F flag. This generates the warning "-f and -F can not be combined". Is there a way around this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.eichelbroenner at lamp-solutions.de Fri Aug 10 13:09:08 2012 From: tobias.eichelbroenner at lamp-solutions.de (=?ISO-8859-15?Q?Tobias_Eichelbr=F6nner?=) Date: Fri, 10 Aug 2012 15:09:08 +0200 Subject: varnish stops and rejects requests Message-ID: <502507F4.4080703@lamp-solutions.de> Hallo, we are using varnish to redirect incoming requests to different sites. We wrote a c-library that connects an embedded sqlite-databese to chose the targets for redirection. The problem is, that after a while, there may be some 100000 requests served correctly, varnish stops working: - clients receive an rejected-massage - varnishlog only show ping-pong massages - syslog shows no entry related to varnish at all - the varnish process is still running - the port (80) is still bond to the varnish process - there is lots of free memory does anyone know a possibility to debug what is happening with varnish that causes the crash? As there are no logfile entries i have no idea how to get any usefull information. Thanks in advance. Sincerely, Tobias -- LAMP solutions GmbH Gostenhofer Hauptstrasse 35 90443 Nuernberg Amtsgericht Nuernberg: HRB 22366 Geschaeftsfuehrer: Heiko Schubert Es gelten unsere allgemeinen Geschaeftsbedingungen. http://www.lamp-solutions.de/agbs/ Telefon : 0911 / 376 516 0 Fax : 0911 / 376 516 11 E-Mail : support at lamp-solutions.de Web : www.lamp-solutions.de Facebook : http://www.facebook.com/LAMPsolutions Twitter : http://twitter.com/#!/lampsolutions From nkinkade at creativecommons.org Fri Aug 10 13:47:29 2012 From: nkinkade at creativecommons.org (Nathan Kinkade) Date: Fri, 10 Aug 2012 09:47:29 -0400 Subject: Remote access to varnish stats / nagios and varnish In-Reply-To: References: Message-ID: On Fri, Aug 10, 2012 at 7:00 AM, Oddur Sn?r Magn?sson wrote: > > Hi, > > I want to monitor some varnishstats (cache hits/misses/bandwith) from my varnish instances with nagios. I?ve found this https://github.com/varnish/varnish-nagios/commits/master but it seems you are running varnish and nagios on the same machine (or using a npre agent on the varnish box). > > What would be ideal for me is to expose a single url that just responds with counter values, possibly just the full output of ?varnishstat ?x?. > > Very similar to http://wiki.nginx.org/NginxHttpStubStatusModule for nginx. > > If it?s possible to access to counter values using inline C, I guess this would be possible using that. > > Best regards, > > Oddur Sn?r Magn?sson > > Senior Programmer | Reykjav?k | Iceland I feel like I may be missing something in what you're looking for, but if all you want is a URL that produces the output of `varnishstat -x`, then it seems trivial to write a practically one line CGI script for this purpose. Or to have a cron job dump the output to a text file in your webroot every so often, and then just accessing that file directly when you need it. Nathan From arboeglin at herffjones.com Fri Aug 10 15:25:04 2012 From: arboeglin at herffjones.com (Boeglin, Adam R) Date: Fri, 10 Aug 2012 15:25:04 +0000 Subject: Remote access to varnish stats / nagios and varnish In-Reply-To: References: Message-ID: <9419C6AEECF0024C9DDAF77FFA2881572C9488@INUCEX2.herffjones.hj-int> On Fri, Aug 10, 2012 at 09:47:29, Nathan Kinkade wrote: > Cc: varnish-misc at varnish-cache.org > Subject: Re: Remote access to varnish stats / nagios and varnish > > On Fri, Aug 10, 2012 at 7:00 AM, Oddur Sn?r Magn?sson > wrote: > > > > Hi, > > > > I want to monitor some varnishstats (cache hits/misses/bandwith) > > from my > varnish instances with nagios. I?ve found this > https://github.com/varnish/varnish-nagios/commits/master but it seems > you are running varnish and nagios on the same machine (or using a > npre agent on the varnish box). > > > > What would be ideal for me is to expose a single url that just > > responds with > counter values, possibly just the full output of ?varnishstat ?x?. > > > > Very similar to http://wiki.nginx.org/NginxHttpStubStatusModule for > nginx. > > > > If it?s possible to access to counter values using inline C, I guess > > this would > be possible using that. > > > > Best regards, > > > > Oddur Sn?r Magn?sson > > > > Senior Programmer | Reykjav?k | Iceland > > I feel like I may be missing something in what you're looking for, but > if all you want is a URL that produces the output of `varnishstat -x`, > then it seems trivial to write a practically one line CGI script for > this purpose. Or to have a cron job dump the output to a text file in > your webroot every so often, and then just accessing that file directly when you need it. > > Nathan > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc I think the most simple option would be to just use the Nagios check_by_ssh plugin to run the varnish-nagios command on the remote system. Adam From hugo.cisneiros at gmail.com Fri Aug 10 21:52:41 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Fri, 10 Aug 2012 18:52:41 -0300 Subject: Adding header depending on if request was fetched or passed In-Reply-To: References: Message-ID: On Fri, Aug 10, 2012 at 5:49 AM, Connor Walls wrote: > Hi all, > > So, as it stands we have the fairly common set up in our vcl_deliver to add a header to indicate whether or not the object was served from cache or not: [...] > Now, in addition to this, I was wondering if it would be possible to add a header to indicate whether or not we attempted to fetch the object from cache, i.e. if the request had gone through vcl_fetch or vcl_pass. My initial thought was to add some form of header in those subroutines but obviously I'm not able to access resp here. Is there anything that obj would be able to tell me in vcl_deliver about this? Try setting http headers on vcl_miss (when it needs to fetch from backend) and vcl_hit (when it doesn't). Then o vcl_deliver you set de resp.http.* based on these. Example: sub vcl_hit { set req.http.X-Varnish-TTL = obj.ttl; set req.http.X-Varnish-Cache = "hit"; } sub vcl_miss { set req.http.X-Varnish-TTL = 0; set req.http.X-Varnish-Cache = "miss"; } sub vcl_deliver { set resp.http.X-Varnish-TTL = req.http.X-Varnish-TTL; set resp.http.X-Varnish-Cache = req.http.X-Varnish-Cache; } -- []'s Hugo www.devin.com.br From perbu at varnish-software.com Sat Aug 11 07:45:00 2012 From: perbu at varnish-software.com (Per Buer) Date: Sat, 11 Aug 2012 09:45:00 +0200 Subject: varnish stops and rejects requests In-Reply-To: <502507F4.4080703@lamp-solutions.de> References: <502507F4.4080703@lamp-solutions.de> Message-ID: On Fri, Aug 10, 2012 at 3:09 PM, Tobias Eichelbr?nner < tobias.eichelbroenner at lamp-solutions.de> wrote: > Hallo, > > we are using varnish to redirect incoming requests to different sites. > We wrote a c-library that connects an embedded sqlite-databese to chose > the targets for redirection. > > The problem is, that after a while, there may be some 100000 requests > served correctly, varnish stops working: > Without source it would be hard to understand why (hey! the world need an sqlite vmod, people might even fix your problem for free! :), but my initial guess would be that you somehow manage to get Varnish to leak sessions. Look at varnishstat while you are testing and you should spot it. The default is a limit of a 100.000 sessions so that is what I'm basing my guess on. Of course you can then send a SIGSEGV to it and load the dump into gbd. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Sun Aug 12 23:52:32 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Mon, 13 Aug 2012 01:52:32 +0200 Subject: Regex question In-Reply-To: References: Message-ID: Hi, Thanks alot for help .. what if we want to check specific 1) specific plugin lets say postie in wordpress ? 2) all of url under plugin ? thanks in advance. BR Zeeshan On Tue, Aug 7, 2012 at 10:48 PM, Jonathan Hursey < jonathan.hursey at adrevolution.com> wrote: > oops... I knew that > > > On Tue, Aug 7, 2012 at 3:45 PM, Hugo Cisneiros (Eitch) < > hugo.cisneiros at gmail.com> wrote: > >> On Mon, Aug 6, 2012 at 9:13 PM, Jonathan Hursey >> wrote: >> > if (req.http.host == ('^(cdn)\..+\.+') >> > { >> > set req.backened = cdnserver >> > } >> >> Use the "~" symbol when using regex while comparing[1]. >> >> This should work: >> >> if (req.http.host ~ "^cdn\.") { >> set req.backend = be_cdnserver; >> } >> >> [1] https://www.varnish-cache.org/docs/3.0/reference/vcl.html >> >> -- >> []'s >> Hugo >> www.devin.com.br >> >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drais at icantclick.org Mon Aug 13 15:48:09 2012 From: drais at icantclick.org (david raistrick) Date: Mon, 13 Aug 2012 11:48:09 -0400 (EDT) Subject: Remote access to varnish stats / nagios and varnish In-Reply-To: References: Message-ID: On Fri, 10 Aug 2012, Oddur Sn?r Magn?sson wrote: > What would be ideal for me is to expose a single url that just responds with > counter values, possibly just the full output of ?varnishstat ?x?. Um. Sounds like you want access to the management port. from the varnishd man page: -T address[:port] Offer a management interface on the specified address and port. See Management Interface for a list of management commands. https://www.varnish-cache.org/trac/wiki/ManagementPort For us, -T :6082 does the trick - we poll our stats from there. echo "stats" | nc $server $port and parse and go. -- david raistrick http://www.netmeister.org/news/learn2quote.html drais at icantclick.org ascii ribbon campaign - stop html mail http://www.asciiribbon.org/ From perbu at varnish-software.com Mon Aug 13 20:59:48 2012 From: perbu at varnish-software.com (Per Buer) Date: Mon, 13 Aug 2012 22:59:48 +0200 Subject: Remote access to varnish stats / nagios and varnish In-Reply-To: References: Message-ID: On Mon, Aug 13, 2012 at 5:48 PM, david raistrick wrote: > On Fri, 10 Aug 2012, Oddur Sn?r Magn?sson wrote: > > What would be ideal for me is to expose a single url that just responds >> with >> counter values, possibly just the full output of ?varnishstat ?x?. >> > > Um. Sounds like you want access to the management port. > > from the varnishd man page: > -T address[:port] > Offer a management interface on the specified address and > port. See Management Interface for > a list of management commands. > > https://www.varnish-cache.org/**trac/wiki/ManagementPort > > > For us, -T :6082 does the trick - we poll our stats from there. > > echo "stats" | nc $server $port > and parse and go. > The implementation of "stats" wasn't really up to scratch and was ditched in Varnish 3.0. However, wrapping "varnishstat -1 -x" in a tiny CGI service is probably a 15 minute job. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From drais at icantclick.org Mon Aug 13 21:22:07 2012 From: drais at icantclick.org (david raistrick) Date: Mon, 13 Aug 2012 17:22:07 -0400 (EDT) Subject: Remote access to varnish stats / nagios and varnish In-Reply-To: References: Message-ID: On Mon, 13 Aug 2012, Per Buer wrote: > The implementation of "stats" wasn't really up to scratch and was ditched in > Varnish 3.0. However, wrapping "varnishstat -1 -x" in a tiny CGI service is > probably a 15 minute job. What? really? wtf? stats is gone from the management interface? Damn good thing we never updated to 3.0...and sounds like we never will. :( Network services absolutely -must- provide network interfaces for statistics polling! IMPO. While not perfect, the stats interface was significantly better than -every- other competing product out there. :( -- david raistrick http://www.netmeister.org/news/learn2quote.html drais at icantclick.org ascii ribbon campaign - stop html mail http://www.asciiribbon.org/ From kervin at adevsoft.com Mon Aug 13 22:50:09 2012 From: kervin at adevsoft.com (Kervin L. Pierre) Date: Mon, 13 Aug 2012 22:50:09 +0000 Subject: Varnish is not always adding X-Forwarded-For In-Reply-To: References: Message-ID: Did you get an answer to this question? I'm running into the same issue. After piping "POSTs" to get around another issues, we noticed that X-forwarded-For is not being returned to the backend server. Is there a way to guarantee that x-forwarded-for is present on backend requests, even on pipes? Best regards, Kervin Adevsoft Inc Business Software Development http://adevsoft.com/ From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Doug Eubanks Sent: Friday, August 03, 2012 10:18 AM To: varnish-misc at varnish-cache.org Subject: Varnish is not always adding X-Forwarded-For We need Varnish to always add X-Forwarded-For so that we can see the visitor's IP when they submit a poll answer. We have this setup, but we are still seeing about half of our requests not include the X-Forwarded-For header. sub vcl_pipe { ? ? ? ? set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For; ? ? ? ? set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", ", "); ? ? ? ? set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", client.ip); ? ? ? ? set req.http.connection = "close"; } Sincerely, Doug Eubanks admin at dougware.net K1DUG (919) 201-8750 From pprocacci at datapipe.com Mon Aug 13 23:43:58 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Mon, 13 Aug 2012 18:43:58 -0500 Subject: Varnish is not always adding X-Forwarded-For In-Reply-To: References: Message-ID: <20120813234358.GL43986@nat.myhome> If I'm not mistaken, once you pipe a connection to the backend machines, future requests over the same socket will be untouched. To ensure requests always touch the vcl code that adds the header, ensure you close connections after the first request. ~Paul On Mon, Aug 13, 2012 at 10:50:09PM +0000, Kervin L. Pierre wrote: > Did you get an answer to this question? I'm running into the same issue. > > After piping "POSTs" to get around another issues, we noticed that X-forwarded-For is not being returned to the backend server. > > Is there a way to guarantee that x-forwarded-for is present on backend requests, even on pipes? > > Best regards, > Kervin > > > Adevsoft Inc > Business Software Development > http://adevsoft.com/ > > From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Doug Eubanks > Sent: Friday, August 03, 2012 10:18 AM > To: varnish-misc at varnish-cache.org > Subject: Varnish is not always adding X-Forwarded-For > > We need Varnish to always add X-Forwarded-For so that we can see the visitor's IP when they submit a poll answer. > > We have this setup, but we are still seeing about half of our requests not include the X-Forwarded-For header. > > sub vcl_pipe { > ?? ?? ?? ?? set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For; > ?? ?? ?? ?? set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", ", "); > ?? ?? ?? ?? set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", client.ip); > ?? ?? ?? ?? set req.http.connection = "close"; > } > > Sincerely, > Doug Eubanks > admin at dougware.net > K1DUG > (919) 201-8750 > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. From perbu at varnish-software.com Tue Aug 14 05:39:01 2012 From: perbu at varnish-software.com (Per Buer) Date: Tue, 14 Aug 2012 07:39:01 +0200 Subject: Remote access to varnish stats / nagios and varnish In-Reply-To: References: Message-ID: On Mon, Aug 13, 2012 at 11:22 PM, david raistrick wrote: > On Mon, 13 Aug 2012, Per Buer wrote: > > The implementation of "stats" wasn't really up to scratch and was ditched >> in >> Varnish 3.0. However, wrapping "varnishstat -1 -x" in a tiny CGI service >> is >> probably a 15 minute job. >> > > What? really? wtf? stats is gone from the management interface? > > Damn good thing we never updated to 3.0...and sounds like we never will. :( > There isn't much work going into maintaining the 2.1 branch so I would not recommend, at least not without paying a bit of attention. Network services absolutely -must- provide network interfaces for > statistics polling! IMPO. > I'm not sure I agree. Binding varnishstat to a TCP port through xinetd or another inetd variant is trivial. Also, if you insist on having the stats command "in line" you could use the varnish agent ( https://github.com/varnish/varnish-agent) which also ads a couple of other commands into the protocol. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Tue Aug 14 10:56:04 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Tue, 14 Aug 2012 12:56:04 +0200 Subject: Regex question In-Reply-To: References: Message-ID: Hi, Got good link here http://kly.no/varnish/regex.txt Zeeshan On Mon, Aug 13, 2012 at 1:52 AM, Zeeshan Ali Shah wrote: > Hi, Thanks alot for help .. > > what if we want to check specific > 1) specific plugin lets say postie in wordpress ? > 2) all of url under plugin ? > > > thanks in advance. > > BR > > Zeeshan > > > On Tue, Aug 7, 2012 at 10:48 PM, Jonathan Hursey < > jonathan.hursey at adrevolution.com> wrote: > >> oops... I knew that >> >> >> On Tue, Aug 7, 2012 at 3:45 PM, Hugo Cisneiros (Eitch) < >> hugo.cisneiros at gmail.com> wrote: >> >>> On Mon, Aug 6, 2012 at 9:13 PM, Jonathan Hursey >>> wrote: >>> > if (req.http.host == ('^(cdn)\..+\.+') >>> > { >>> > set req.backened = cdnserver >>> > } >>> >>> Use the "~" symbol when using regex while comparing[1]. >>> >>> This should work: >>> >>> if (req.http.host ~ "^cdn\.") { >>> set req.backend = be_cdnserver; >>> } >>> >>> [1] https://www.varnish-cache.org/docs/3.0/reference/vcl.html >>> >>> -- >>> []'s >>> Hugo >>> www.devin.com.br >>> >>> _______________________________________________ >>> varnish-misc mailing list >>> varnish-misc at varnish-cache.org >>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>> >> >> >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Tue Aug 14 18:55:51 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Tue, 14 Aug 2012 11:55:51 -0700 Subject: Deliver while caching Message-ID: We need to serve videos from varnish, but the problem is that it deliver the file untill it finish caching it, so if the file weight 500Mb, the client will have to wait around 1 minute in order to varnish to cached it, and then varnish will start the deliver to the client. Is there any way to deliver the file while it is being cached? -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.fernandezcrisial at gmail.com Tue Aug 14 19:00:31 2012 From: roberto.fernandezcrisial at gmail.com (=?ISO-8859-1?Q?Roberto_O=2E_Fern=E1ndez_Crisial?=) Date: Tue, 14 Aug 2012 16:00:31 -0300 Subject: Deliver while caching In-Reply-To: References: Message-ID: Try the latest Varnish version, it has streaming support ;) Best, Roberto @rofc On Tue, Aug 14, 2012 at 3:55 PM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > We need to serve videos from varnish, but the problem is that it deliver > the file untill it finish caching it, so if the file weight 500Mb, the > client will have to wait around 1 minute in order to varnish to cached it, > and then varnish will start the deliver to the client. > > Is there any way to deliver the file while it is being cached? > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at ibotty.net Tue Aug 14 19:01:44 2012 From: me at ibotty.net (me at ibotty.net) Date: Tue, 14 Aug 2012 21:01:44 +0200 Subject: Deliver while caching In-Reply-To: References: Message-ID: <502AA098.6010007@ibotty.net> hi, > Is there any way to deliver the file while it is being cached? you can use return(pipe) for these requests (if you can deduce from the url what they are). that should work. i do not know, whether there are better ways. regards, tobias florek From abraham.sustaita at buscacorp.com Tue Aug 14 19:03:49 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Tue, 14 Aug 2012 12:03:49 -0700 Subject: Deliver while caching In-Reply-To: References: Message-ID: I have varnish 3. me at ibotty.net suggest me to use return (pipe). That is the way to stream the content? 2012/8/14 Roberto O. Fern?ndez Crisial > Try the latest Varnish version, it has streaming support ;) > > Best, > Roberto > @rofc > > On Tue, Aug 14, 2012 at 3:55 PM, Abraham Cruz Sustaita < > abraham.sustaita at buscacorp.com> wrote: > >> We need to serve videos from varnish, but the problem is that it deliver >> the file untill it finish caching it, so if the file weight 500Mb, the >> client will have to wait around 1 minute in order to varnish to cached it, >> and then varnish will start the deliver to the client. >> >> Is there any way to deliver the file while it is being cached? >> >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apj at mutt.dk Tue Aug 14 19:21:02 2012 From: apj at mutt.dk (Andreas Plesner Jacobsen) Date: Tue, 14 Aug 2012 21:21:02 +0200 Subject: Deliver while caching In-Reply-To: References: Message-ID: <20120814192102.GA30583@nerd.dk> On Tue, Aug 14, 2012 at 04:00:31PM -0300, Roberto O. Fern?ndez Crisial wrote: > Try the latest Varnish version, it has streaming support ;) There's a branch with streaming support. The standard 3.0.2 release does not contain those patches. See https://www.varnish-software.com/blog/http-streaming-varnish for more info. -- Andreas From me at ibotty.net Tue Aug 14 19:28:26 2012 From: me at ibotty.net (me at ibotty.net) Date: Tue, 14 Aug 2012 21:28:26 +0200 Subject: Deliver while caching In-Reply-To: <20120814192102.GA30583@nerd.dk> References: <20120814192102.GA30583@nerd.dk> Message-ID: <502AA6DA.6090008@ibotty.net> > There's a branch with streaming support. The standard 3.0.2 release does not > contain those patches. See > https://www.varnish-software.com/blog/http-streaming-varnish for more info. which is out of date. (3.0.2 does not contain streaming support) From abraham.sustaita at buscacorp.com Tue Aug 14 19:46:06 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Tue, 14 Aug 2012 12:46:06 -0700 Subject: Deliver while caching In-Reply-To: <502AA6DA.6090008@ibotty.net> References: <20120814192102.GA30583@nerd.dk> <502AA6DA.6090008@ibotty.net> Message-ID: If I used pipe, the content is not cached, am I right? 2012/8/14 > > There's a branch with streaming support. The standard 3.0.2 release does > not > > contain those patches. See > > https://www.varnish-software.com/blog/http-streaming-varnish for more > info. > > which is out of date. (3.0.2 does not contain streaming support) > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at ibotty.net Tue Aug 14 19:48:05 2012 From: me at ibotty.net (me at ibotty.net) Date: Tue, 14 Aug 2012 21:48:05 +0200 Subject: Deliver while caching In-Reply-To: References: <20120814192102.GA30583@nerd.dk> <502AA6DA.6090008@ibotty.net> Message-ID: <502AAB75.6090403@ibotty.net> > If I used pipe, the content is not cached, am I right? yes From abraham.sustaita at buscacorp.com Tue Aug 14 19:49:09 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Tue, 14 Aug 2012 12:49:09 -0700 Subject: Deliver while caching In-Reply-To: <502AAB75.6090403@ibotty.net> References: <20120814192102.GA30583@nerd.dk> <502AA6DA.6090008@ibotty.net> <502AAB75.6090403@ibotty.net> Message-ID: So then, there is no way I can do what I want? Deliver while caching and keep that in cache? Abraham Cruz Sustaita Leader Development Mail: abraham.sustaita at buscacorp.com Ph: +52 (664) 200.2213 F: +52 (664) 200.2234 M: +52 (664) 123.0312 Calle Brasil No. 8471. Col. Ju?rez, Tijuana Baja California, CP 22040 BuscaCorp.com | LevelUp.com | MetaTube.com | SanDiegoRed.com | Tarreo.com This e-mail message is intended only for the personal use of the recipient(s) named above. This message may be an attorney-client communication and as such privileged and confidential. If you are not an intended recipient,you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message. Este mensaje es para uso personal de(los) destinatario(s) a cuyos nombres se dirige. Este mensaje puede ser comunicaci?n abogado-cliente y por tanto es privilegiado y confidencial. Si usted no es la persona a quien se intent? enviar este mensaje, no debe revisarlo, copiarlo o distribuirlo en forma alguna. Si ha recibido este mensaje por error, por favor notif?quelo inmediatamente por email y destruya el mensaje original. 2012/8/14 > > If I used pipe, the content is not cached, am I right? > > yes > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apj at mutt.dk Tue Aug 14 19:50:44 2012 From: apj at mutt.dk (Andreas Plesner Jacobsen) Date: Tue, 14 Aug 2012 21:50:44 +0200 Subject: Deliver while caching In-Reply-To: <502AA6DA.6090008@ibotty.net> References: <20120814192102.GA30583@nerd.dk> <502AA6DA.6090008@ibotty.net> Message-ID: <20120814195044.GB30583@nerd.dk> On Tue, Aug 14, 2012 at 09:28:26PM +0200, me at ibotty.net wrote: > > There's a branch with streaming support. The standard 3.0.2 release does not > > contain those patches. See > > https://www.varnish-software.com/blog/http-streaming-varnish for more info. > > which is out of date. (3.0.2 does not contain streaming support) No it's not. It talks about limited streaming support in 3.0.2: only one client can stream an object. But 3.0.2s (note the s, denoting a streaming release) is a release of the streaming branch, which supports more than one client. -- Andreas From admin at dougware.net Wed Aug 15 17:33:57 2012 From: admin at dougware.net (Doug Eubanks) Date: Wed, 15 Aug 2012 13:33:57 -0400 Subject: Varnish is not always adding X-Forwarded-For In-Reply-To: <20120813234358.GL43986@nat.myhome> References: <20120813234358.GL43986@nat.myhome> Message-ID: I had a close at the end of the pipe: sub vcl_pipe { set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For; set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", ", "); set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", client.ip); set req.http.connection = "close"; } It still isn't working as we had hoped. Sincerely, Doug Eubanks admin at dougware.net K1DUG (919) 201-8750 On Mon, Aug 13, 2012 at 7:43 PM, Paul A. Procacci wrote: > If I'm not mistaken, once you pipe a connection to the backend machines, > future requests over > the same socket will be untouched. To ensure requests always touch the > vcl code that adds > the header, ensure you close connections after the first request. > > ~Paul > > On Mon, Aug 13, 2012 at 10:50:09PM +0000, Kervin L. Pierre wrote: > > Did you get an answer to this question? I'm running into the same issue. > > > > After piping "POSTs" to get around another issues, we noticed that > X-forwarded-For is not being returned to the backend server. > > > > Is there a way to guarantee that x-forwarded-for is present on backend > requests, even on pipes? > > > > Best regards, > > Kervin > > > > > > Adevsoft Inc > > Business Software Development > > http://adevsoft.com/ > > > > From: varnish-misc-bounces at varnish-cache.org [mailto: > varnish-misc-bounces at varnish-cache.org] On Behalf Of Doug Eubanks > > Sent: Friday, August 03, 2012 10:18 AM > > To: varnish-misc at varnish-cache.org > > Subject: Varnish is not always adding X-Forwarded-For > > > > We need Varnish to always add X-Forwarded-For so that we can see the > visitor's IP when they submit a poll answer. > > > > We have this setup, but we are still seeing about half of our requests > not include the X-Forwarded-For header. > > > > sub vcl_pipe { > > ?? ?? ?? ?? set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For; > > ?? ?? ?? ?? set bereq.http.X-Forwarded-For = > regsub(bereq.http.X-Forwarded-For, "$", ", "); > > ?? ?? ?? ?? set bereq.http.X-Forwarded-For = > regsub(bereq.http.X-Forwarded-For, "$", client.ip); > > ?? ?? ?? ?? set req.http.connection = "close"; > > } > > > > Sincerely, > > Doug Eubanks > > admin at dougware.net > > K1DUG > > (919) 201-8750 > > _______________________________________________ > > varnish-misc mailing list > > varnish-misc at varnish-cache.org > > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > > ________________________________ > > This message may contain confidential or privileged information. If you > are not the intended recipient, please advise us immediately and delete > this message. See http://www.datapipe.com/legal/email_disclaimer/ for > further information on confidentiality and the risks of non-secure > electronic communication. If you cannot access these links, please notify > us by reply message and we will send the contents to you. > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Thu Aug 16 07:10:48 2012 From: perbu at varnish-software.com (Per Buer) Date: Thu, 16 Aug 2012 09:10:48 +0200 Subject: Deliver while caching In-Reply-To: <502AA6DA.6090008@ibotty.net> References: <20120814192102.GA30583@nerd.dk> <502AA6DA.6090008@ibotty.net> Message-ID: On Tue, Aug 14, 2012 at 9:28 PM, wrote: > > There's a branch with streaming support. The standard 3.0.2 release does > not > > contain those patches. See > > https://www.varnish-software.com/blog/http-streaming-varnish for more > info. > > which is out of date. (3.0.2 does not contain streaming support) > The post doesn't say so. It only states that the code will be merged with the 3.0 branch. The result is in the 3.0.2s release. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Thu Aug 16 07:12:10 2012 From: perbu at varnish-software.com (Per Buer) Date: Thu, 16 Aug 2012 09:12:10 +0200 Subject: Deliver while caching In-Reply-To: References: <20120814192102.GA30583@nerd.dk> <502AA6DA.6090008@ibotty.net> <502AAB75.6090403@ibotty.net> Message-ID: On Tue, Aug 14, 2012 at 9:49 PM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > So then, there is no way I can do what I want? Deliver while caching and > keep that in cache? > Use the 3.0.2s release. repo.varnish-cache.org/test/ has some packages. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Thu Aug 16 07:18:17 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Thu, 16 Aug 2012 00:18:17 -0700 Subject: Deliver while caching In-Reply-To: References: <20120814192102.GA30583@nerd.dk> <502AA6DA.6090008@ibotty.net> <502AAB75.6090403@ibotty.net> Message-ID: Is it compatible with Scientific Linux? 2012/8/16 Per Buer > On Tue, Aug 14, 2012 at 9:49 PM, Abraham Cruz Sustaita < > abraham.sustaita at buscacorp.com> wrote: > >> So then, there is no way I can do what I want? Deliver while caching and >> keep that in cache? >> > > Use the 3.0.2s release. repo.varnish-cache.org/test/ has some packages. > > -- > Per Buer > Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer > *Varnish makes websites fly!* > Whitepapers | Video | > Twitter > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Thu Aug 16 07:38:45 2012 From: perbu at varnish-software.com (Per Buer) Date: Thu, 16 Aug 2012 09:38:45 +0200 Subject: Deliver while caching In-Reply-To: References: <20120814192102.GA30583@nerd.dk> <502AA6DA.6090008@ibotty.net> <502AAB75.6090403@ibotty.net> Message-ID: On Thu, Aug 16, 2012 at 9:18 AM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > Is it compatible with Scientific Linux? Seriously, please take the effort to quote properly. Outlook-style quoting doesn't really work well in a thread with multiple issue. Also; yes. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From nfn at sapo.pt Sun Aug 19 10:17:26 2012 From: nfn at sapo.pt (nfn at sapo.pt) Date: Sun, 19 Aug 2012 11:17:26 +0100 Subject: Varnish and IPB Message-ID: <20120819111726.Horde.XVMUeuanEAJQML023dHVzAA@mail.sapo.pt> Hello, I'm trying for some days to setup varnish with IPB (Invision Power Board) without success. The relevant information is: Cookie member_id: can have -1 (log out users); 0 (guests) and > 0 (members) Cookies guestSkinChoice|language|mobileBrowser; don't want to cache when they are present. Cookie session_id: php session id; Must be removed So, in general, I can only cache when member_id is (0|-1) and no other cookies are present. By default, varnish should not cache anything ... I just want to cache url's started by: "/" ""index.php" "/topic" "/forum" Here is a vcl that is not working as expected and I don't know what is wrong. I using varnish 3. Can someone give me some help? Thanks ---------------------------------------------- sub vcl_recv { if (req.http.Cookie) { set req.http.Cookie = ";" + req.http.Cookie; set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";"); set req.http.Cookie = regsuball(req.http.Cookie, ";(member_id|guestSkinChoice|language|mobileBrowser)=", "; \1="); set req.http.Cookie = regsuball(req.http.Cookie, ";[^ ][^;]*", ""); set req.http.Cookie = regsuball(req.http.Cookie, "^[; ]+|[; ]+$", ""); if (req.http.Cookie == "") { remove req.http.Cookie; } } if ((req.http.Cookie ~ "member_id=" && req.http.Cookie !~ "member_id=(0|-1)") || req.http.Cookie ~ "guestSkinChoice" || req.http.Cookie ~ "language" || req.http.Cookie ~ "mobileBrowser") { return(pass); } } sub vcl_fetch { if (beresp.http.set-cookie) { set beresp.http.set-cookie = ";" + beresp.http.set-cookie; set beresp.http.set-cookie = regsuball(beresp.http.set-cookie, "; +", ";"); set beresp.http.set-cookie = regsuball(beresp.http.set-cookie, ";(member_id|guestSkinChoice|language|mobileBrowser)=", "; \1="); set beresp.http.set-cookie = regsuball(beresp.http.set-cookie, ";[^ ][^;]*", ""); set beresp.http.set-cookie = regsuball(beresp.http.set-cookie, "^[; ]+|[; ]+$", ""); if (beresp.http.set-cookie == "") { remove beresp.http.set-cookie; } } if ((beresp.http.set-cookie ~ "member_id=" && beresp.http.set-cookie !~ "member_id=(0|-1)") || beresp.http.set-cookie ~ "guestSkinChoice" || beresp.http.set-cookie ~ "language" || beresp.http.set-cookie ~ "mobileBrowser") { set beresp.ttl = 0s; } else { set beresp.ttl = 120s; } ## == Index == if ((req.url == "/" || req.url == "/index.php") && beresp.ttl > 0s) { unset beresp.http.set-cookie; set beresp.ttl = 10m; } ## == Topic == if ((req.url ~ "^/topic/") && beresp.ttl > 0s) { unset beresp.http.set-cookie; set beresp.ttl = 30m; } ## == Forum == if ((req.url ~ "^/forum/") && beresp.ttl > 0s) { unset beresp.http.set-cookie; set beresp.ttl = 60m; } } From theistian at gmx.com Tue Aug 21 14:10:14 2012 From: theistian at gmx.com (=?UTF-8?B?Q2FybG9zIFBlw7Fhcw==?=) Date: Tue, 21 Aug 2012 16:10:14 +0200 Subject: can vcl.load continue with unused backends? Message-ID: <503396C6.8020405@gmx.com> Hi all. I've found this [0] DenverCoder9's issue in the trac. In the resolution of that issue its said "This has already been fixed in trunk where you can set a parameter to turn these errors into warnings.//" Well, I'm trying to find that option but in the ticket there's any clues. I also checked the docs and varnishd man page but still can't find any reference. I'm using varnish 3.0.x from apt packages. There's a way to compile a VCL with a backend defined but not assined? Thanks. * [0] https://www.varnish-cache.org/trac/ticket/846 From connor.walls at skillpages.com Wed Aug 22 13:49:38 2012 From: connor.walls at skillpages.com (Connor Walls) Date: Wed, 22 Aug 2012 14:49:38 +0100 Subject: Out of memory exception on Varnish 2.1.5 Message-ID: Hi, We've recently been having problems with varnish being killed with out of memory problems, our logs show information like this: Aug 22 10:56:17 ip-10-87-13-87 kernel: [4050442.556330] varnishd invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0 Aug 22 10:56:17 ip-10-87-13-87 kernel: [4050442.556336] varnishd cpuset=/ mems_allowed=0 Aug 22 10:56:17 ip-10-87-13-87 kernel: [4050442.556340] Pid: 17729, comm: varnishd Not tainted 2.6.32-312-ec2 #24-Ubuntu Aug 22 10:56:17 ip-10-87-13-87 kernel: [4050442.556342] Call Trace: Now, we've been planning from Varnish 2.1.5 to 3.0 for a while, and we're hoping that this will solve our issues, but I just want to check if there are known OOM issues in 2.1.5, or is the problem likely to persist after upgrading to 3.0? Thanks, Connor Walls -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Wed Aug 22 15:11:46 2012 From: perbu at varnish-software.com (Per Buer) Date: Wed, 22 Aug 2012 17:11:46 +0200 Subject: Out of memory exception on Varnish 2.1.5 In-Reply-To: References: Message-ID: Hi Connor, On Wed, Aug 22, 2012 at 3:49 PM, Connor Walls wrote: > Hi,**** > > ** ** > > We?ve recently been having problems with varnish being killed with out of > memory problems, our logs show information like this: > This is not a bug in Varnish. It is most probably a misconfiguration. You either have to little memory in your system or you are asking Varnish to use too much. I'm guessing you are using -s malloc. Remember that there is a 1k overhead on each object stored in Varnish. > **** > > **(..) ** > > > > ** > > Now, we?ve been planning from Varnish 2.1.5 to 3.0 for a while, and we?re > hoping that this will solve our issues, but I just want to check if there > are known OOM issues in 2.1.5, or is the problem likely to persist after > upgrading to 3.0? > It will probably persist. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From connor.walls at skillpages.com Wed Aug 22 15:14:31 2012 From: connor.walls at skillpages.com (Connor Walls) Date: Wed, 22 Aug 2012 16:14:31 +0100 Subject: Out of memory exception on Varnish 2.1.5 In-Reply-To: References: Message-ID: Ah, I was under the impression that varnish would evict items from the cache if memory usage hit the ceiling. Thanks for the help, I look into our configuration and see if there's anything we can do. Thanks, Connor From: Per Buer [mailto:perbu at varnish-software.com] Sent: 22 August 2012 16:12 To: Connor Walls Cc: varnish-misc at varnish-cache.org Subject: Re: Out of memory exception on Varnish 2.1.5 Hi Connor, On Wed, Aug 22, 2012 at 3:49 PM, Connor Walls > wrote: Hi, We've recently been having problems with varnish being killed with out of memory problems, our logs show information like this: This is not a bug in Varnish. It is most probably a misconfiguration. You either have to little memory in your system or you are asking Varnish to use too much. I'm guessing you are using -s malloc. Remember that there is a 1k overhead on each object stored in Varnish. (..) Now, we've been planning from Varnish 2.1.5 to 3.0 for a while, and we're hoping that this will solve our issues, but I just want to check if there are known OOM issues in 2.1.5, or is the problem likely to persist after upgrading to 3.0? It will probably persist. -- [cid:~WRD000.jpg] Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer Varnish makes websites fly! Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: ~WRD000.jpg URL: From xhrfc at yahoo.com Thu Aug 23 09:22:41 2012 From: xhrfc at yahoo.com (X.H.R.F.C.) Date: Thu, 23 Aug 2012 02:22:41 -0700 (PDT) Subject: esi problem Message-ID: <1345713761.21108.YahooMailNeo@web142706.mail.bf1.yahoo.com> Hello all, I have a big problem with auth cookie, esi include on my website. In my page i have a section made for auth users, it has 2 stages: - if auth is made, show some user specific things, if not shows login button auth works, logout works ... BUT somethimes after i logout i get details for some other user like i'm logged in with that user (but i'm not and there is no auth cookie for it ... is just like plain html only from varnish, on refresh it goes away randomly) I control esi trough http headers like u will see in my confs bellow. If someone finds what is the problem, please let me know. VARNISH Package: varnish Status: install ok installed Priority: optional Section: web Installed-Size: 1295 Maintainer: Varnish Package Maintainers Architecture: amd64 Version: 3.0.2-2 site.vcl ================================================================================================================ import std; # server 1 backend drr0001 { ? ? .host = "drr0001"; ? ? .port = "80"; ? ? .connect_timeout = 1s; ? ? .first_byte_timeout = 30s; ? ? .between_bytes_timeout = 30s; ? ? .probe = { ? ? ? ? ? ? ? ? .url = "/"; ? ? ? ? ? ? ? ? .interval = 2m; ? ? ? ? ? ? ? ? .timeout = 20s; ? ? ? ? ? ? ? ? .window = 5; ? ? ? ? ? ? ? ? .threshold = 3; ? } } # server 2 backend drr0002 { ? ? .host = "drr0002"; ? ? .port = "80"; ? ? .connect_timeout = 1s; ? ? .first_byte_timeout = 30s; ? ? .between_bytes_timeout = 30s; ? ? .probe = { ? ? ? ? ? ? ? ? .url = "/"; ? ? ? ? ? ? ? ? .interval = 2m; ? ? ? ? ? ? ? ? .timeout = 20s; ? ? ? ? ? ? ? ? .window = 5; ? ? ? ? ? ? ? ? .threshold = 3; ? } } # server 3 backend drr0003 { ? ? .host = "drr0003"; ? ? .port = "80"; ? ? .connect_timeout = 1s; ? ? .first_byte_timeout = 30s; ? ? .between_bytes_timeout = 30s; ? ? .probe = { ? ? ? ? ? ? ? ? .url = "/"; ? ? ? ? ? ? ? ? .interval = 2m; ? ? ? ? ? ? ? ? .timeout = 20s; ? ? ? ? ? ? ? ? .window = 5; ? ? ? ? ? ? ? ? .threshold = 3; ? } } # Round-Robin load balance site hosts director site round-robin { ? ? ? ? { ? ? ? ? ? ? ? ? .backend = drr0001; ? ? ? ? } ? ? ? ? { ? ? ? ? ? ? ? ? .backend = drr0002; ? ? ? ? } ? ? ? ? { ? ? ? ? ? ? ? ? .backend = drr0003; ? ? ? ? } } # ACL to allow cache Purge acl purge { "drr0001"; "drr0002"; "drr0003"; "drr0001-ifnet"; "drr0002-ifnet"; "drr0003-ifnet"; } # Receive sub vcl_recv { # check acl purge at the top and purges ? if (req.request == "PURGE")? { ? ? if (!client.ip ~ purge) { ? ? ? error 404 "Not Found!"; ? ? } ? ? return (lookup); ? } ?? if (! req.http.Host) { error 404 "Your query need a host header !"; } if (req.http.Host ~ "test.site.com") { set req.backend = site; include "/etc/varnish/site-esi-recv.vcl"; } else { error 404 "No Varnish configuration for your host header."; } } ## FETCH sub vcl_fetch { if (req.restarts > 3) { set beresp.saintmode = 5m; } if (req.http.Host ~ "test.site.com") { include "/etc/varnish/site-esi-fetch.vcl"; } else { return (deliver); } } # HIT sub vcl_hit { if (req.request == "PURGE") { purge; error 200 "Purged."; } } # MISS sub vcl_miss { if (req.request == "PURGE") { purge; error 200 "Purged."; } } ## DELIVER sub vcl_deliver { if (obj.hits > 0) { ? ? ? ? set resp.http.X-Varnish-Cache = "From VARNISH (" +obj.hits+ ")"; ? ? } else { ? ? ? ? set resp.http.X-Varnish-Cache = "MISS"; ? ? } # Secure the header #remove resp.http.Via; #remove resp.http.X-Varnish; #remove resp.http.Server; #remove resp.http.X-Powered-By; } ================================================================================================================ site-esi-fetch.vcl ================================================================================================================ # Enable ESI set beresp.do_esi = true; set beresp.ttl = 0s; if (beresp.http.esi-enabled == "true") { ? ? ? ? set beresp.ttl = std.duration(beresp.http.esi-ttl,1m); ? ? ? ? unset beresp.http.esi-enabled; unset beresp.http.esi-ttl; } return (deliver); ================================================================================================================ site-esi-recv.vcl ================================================================================================================ # Compatiblity with Apache log remove req.http.X-Forwarded-For; set ? ?req.http.X-Forwarded-For = client.ip; # Post requests will not be cached if (req.request == "POST")? { return (pass); } # Pass Auth sessions if (req.url ~ "auth/esirander" || req.url ~ "admin" || req.url ~ "support"){ return (pass); }else{ unset req.http.cookie; } # Normalize encoding/compression 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? {? remove req.http.Accept-Encoding;? } } # Serve the page unset req.http.vary; return (lookup); ================================================================================================================ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cornel.Vaideanu at greppysystems.com Fri Aug 24 08:36:01 2012 From: Cornel.Vaideanu at greppysystems.com (Cornel Vaideanu) Date: Fri, 24 Aug 2012 08:36:01 +0000 Subject: When setting a cookie, the old ones are lost Message-ID: Hello I am using Varnish 3 in in front of apache with php. I need to set a cookie in the browser every time the user doesn't receive a 503 response I use the following code: if(resp.status != 503) { set resp.http.Set-Cookie = "my_error_cookie =false; expires: Session; path=/"; } The problem is that the cookies received from apache are rewritten, if I use this I never receive the PHPSESSID cookie. For debug proposes I added this code : set resp.http.X-Cookie-Debug = "Response cookie: " + resp.http.Set-Cookie; if(resp.status != 503) { set resp.http.Set-Cookie = " my_error_cookie=false; expires: Session; path=/"; } set resp.http.X-Cookie-Debug2 = "Response cookie2: " + resp.http.Set-Cookie; These are the headers that browser receives : 1. X-Cookie-Debug: Response cookie: PHPSESSID=egf2tthsj0fm2bmt1oircumgk6; path=/ 2. X-Cookie-Debug2: Response cookie2: my_error_cookie=false; expires: Session; path=/ And there is only one Set-Cookie header : Set-Cookie: my_error_cookie=false; expires: Session; path=/ Can you tell me how can I set a new cookie without losing the cookies that apache sends ? Thank you very much Cornel Vaideanu PHP Developer M: [http://greppysystems.com/ftp/logo.png] 17-19A, Ploiesti Street, Cluj-Napoca, Romania www.greppysystems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From biot023 at gmail.com Fri Aug 24 08:45:48 2012 From: biot023 at gmail.com (doug livesey) Date: Fri, 24 Aug 2012 09:45:48 +0100 Subject: Trouble getting varnish to forwards on to SSL on port 443 Message-ID: Hi -- I've recently setup a varnish instance to serve an image server, but am struggling with how to get it to pass on SSL requests. I've followed the instructions on the site as best I can, but there's still not even a mention on varnishlog when I try to access an asset using HTTPS. Normal HTTP works just fine. I run varnish using the normal service commands (it's on Ubuntu), and my configuration is as follows: default.vcl: https://gist.github.com/3447615 /etc/default/varnish: https://gist.github.com/3447644 When I look for varnish processes on the box, I get this: nobody 2665 0.7 13.4 1453740 1029096 ? Sl 07:58 0:19 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80,:443 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,10G root 30943 0.0 0.0 117204 868 ? Ss Aug22 0:03 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80,:443 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,10G Could anybody please advise me as to where I'm going wrong, here? Any & all advice very gratefully received, Doug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at ibotty.net Fri Aug 24 09:04:38 2012 From: me at ibotty.net (me at ibotty.net) Date: Fri, 24 Aug 2012 11:04:38 +0200 Subject: Trouble getting varnish to forwards on to SSL on port 443 In-Reply-To: References: Message-ID: <503743A6.1010601@ibotty.net> hi doug, > Hi -- I've recently setup a varnish instance to serve an image server, but > am struggling with how to get it to pass on SSL requests. varnish does not implement ssl (on purpose) you can tunnel ssl with other reverse proxies (stud, stunnel, nginx, lighttpd, even apache). if the proxy listening on port 443 does not forward the request to varnish, look for mistakes in the configuration of the proxy. good luck, tobias florek From biot023 at gmail.com Fri Aug 24 09:23:37 2012 From: biot023 at gmail.com (doug livesey) Date: Fri, 24 Aug 2012 10:23:37 +0100 Subject: Fwd: Trouble getting varnish to forwards on to SSL on port 443 In-Reply-To: References: <503743A6.1010601@ibotty.net> Message-ID: Hi, Tobias -- thanks very much for that. So are you saying that I need some other software on there, too, to be able to send on SSL requests? I had adapted my vcl file from this tutorial: http://www.lullabot.com/articles/varnish-multiple-web-servers-drupal The hope was that, whilst varnish doesn't handle SSL, I would be able to forwards on requests on port 443 (SSL requests, obviously) to be handled by the servers that varnish was caching for. I'm not trying to have varnish handle the SSL authentication or anything, just to pass the request on. Is that not possible? & thanks again for your reply, Doug. On 24 August 2012 10:04, wrote: > hi doug, > > > Hi -- I've recently setup a varnish instance to serve an image server, > but > > am struggling with how to get it to pass on SSL requests. > > varnish does not implement ssl (on purpose) you can tunnel ssl with > other reverse proxies (stud, stunnel, nginx, lighttpd, even apache). > > if the proxy listening on port 443 does not forward the request to > varnish, look for mistakes in the configuration of the proxy. > > good luck, > tobias florek > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at ibotty.net Fri Aug 24 09:37:14 2012 From: me at ibotty.net (me at ibotty.net) Date: Fri, 24 Aug 2012 11:37:14 +0200 Subject: Fwd: Trouble getting varnish to forwards on to SSL on port 443 In-Reply-To: References: <503743A6.1010601@ibotty.net> Message-ID: <50374B4A.6010409@ibotty.net> hi doug, > So are you saying that I need some other software on there, too, to be able > to send on SSL requests? sorry, i do not really understand the question, english is not my first language. in the lullabot article you adapted there are some load balancers in front of varnish. if you deploy load balancers in front of varnish, the ssl en- and decryption has to happen there. (haproxy uses a version of stunnel afair). if not, just run an nginx server on port 443 and proxy it to varnish (proxy_pass directive). good luck, tobi From varnish at ds.schledermann.net Fri Aug 24 09:46:10 2012 From: varnish at ds.schledermann.net (Daniel Schledermann) Date: Fri, 24 Aug 2012 11:46:10 +0200 Subject: Fwd: Trouble getting varnish to forwards on to SSL on port 443 In-Reply-To: References: <503743A6.1010601@ibotty.net> Message-ID: <50374D62.5040009@ds.schledermann.net> Den 24-08-2012 11:23, doug livesey skrev: > Hi, Tobias -- thanks very much for that. > So are you saying that I need some other software on there, too, to be > able to send on SSL requests? You are not initializing SSL connections in this setup, AFAICS. > I had adapted my vcl file from this tutorial: > http://www.lullabot.com/articles/varnish-multiple-web-servers-drupal > The hope was that, whilst varnish doesn't handle SSL, I would be able > to forwards on requests on port 443 (SSL requests, obviously) to be > handled by the servers that varnish was caching for. > I'm not trying to have varnish handle the SSL authentication or > anything, just to pass the request on. > No, that is not possible. Varnish reads the HTTP-headers and so on, and can not function as a "dumb" TCP-proxy. However it is quite simple to setup NGINX to do the SSL-decryption, pass it on to Varnish, and then hopefully get some caching done anyway. /D From biot023 at gmail.com Fri Aug 24 10:19:25 2012 From: biot023 at gmail.com (doug livesey) Date: Fri, 24 Aug 2012 11:19:25 +0100 Subject: Fwd: Trouble getting varnish to forwards on to SSL on port 443 In-Reply-To: <50374D62.5040009@ds.schledermann.net> References: <503743A6.1010601@ibotty.net> <50374D62.5040009@ds.schledermann.net> Message-ID: Ah, brilliant, I'll look into that, then. Is there documentation on it? And thanks too, Tobi -- it wasn't you misunderstanding, it was me! :) Cheers, Doug. On 24 August 2012 10:46, Daniel Schledermann wrote: > Den 24-08-2012 11:23, doug livesey skrev: > > Hi, Tobias -- thanks very much for that. >> So are you saying that I need some other software on there, too, to be >> able to send on SSL requests? >> > > You are not initializing SSL connections in this setup, AFAICS. > > > > I had adapted my vcl file from this tutorial: http://www.lullabot.com/** >> articles/varnish-multiple-web-**servers-drupal >> The hope was that, whilst varnish doesn't handle SSL, I would be able to >> forwards on requests on port 443 (SSL requests, obviously) to be handled by >> the servers that varnish was caching for. >> I'm not trying to have varnish handle the SSL authentication or anything, >> just to pass the request on. >> >> > No, that is not possible. Varnish reads the HTTP-headers and so on, and > can not function as a "dumb" TCP-proxy. > However it is quite simple to setup NGINX to do the SSL-decryption, pass > it on to Varnish, and then hopefully get some caching done anyway. > > /D > > > ______________________________**_________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/**lists/mailman/listinfo/**varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From varnish at ds.schledermann.net Fri Aug 24 10:33:21 2012 From: varnish at ds.schledermann.net (Daniel Schledermann) Date: Fri, 24 Aug 2012 12:33:21 +0200 Subject: Fwd: Trouble getting varnish to forwards on to SSL on port 443 In-Reply-To: References: <503743A6.1010601@ibotty.net> <50374D62.5040009@ds.schledermann.net> Message-ID: <50375871.3070809@ds.schledermann.net> Den 24-08-2012 12:19, doug livesey skrev: > Ah, brilliant, I'll look into that, then. Is there documentation on it? I think you can dust up some examples fairly easy. We have something like this used often: server { listen 192.168.10.12:443; server_name secure.example.com; ssl on; ssl_certificate /etc/ssl/private/secure.example.com.crt; ssl_certificate_key /etc/ssl/private/secure.example.com.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; location / { proxy_pass http://127.0.0.1:80/; proxy_redirect off; } proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-From-SSL "On"; proxy_max_temp_file_size 0; } It is under the assumption that you servers ip is 192.168.10.12 and Varnish occupy 127.0.0.1:80 also. In many cases it is good to add some custom headers to make Varnish aware that it is infact decrypted SSL traffic it is dealing with. From biot023 at gmail.com Fri Aug 24 10:51:31 2012 From: biot023 at gmail.com (doug livesey) Date: Fri, 24 Aug 2012 11:51:31 +0100 Subject: Fwd: Trouble getting varnish to forwards on to SSL on port 443 In-Reply-To: <50375871.3070809@ds.schledermann.net> References: <503743A6.1010601@ibotty.net> <50374D62.5040009@ds.schledermann.net> <50375871.3070809@ds.schledermann.net> Message-ID: Fantastic, thankyou very much! On 24 August 2012 11:33, Daniel Schledermann wrote: > Den 24-08-2012 12:19, doug livesey skrev: > > Ah, brilliant, I'll look into that, then. Is there documentation on it? >> > > I think you can dust up some examples fairly easy. We have something like > this used often: > > > server { > listen 192.168.10.12:443; > > server_name secure.example.com; > > ssl on; > ssl_certificate /etc/ssl/private/secure.**example.com.crt; > ssl_certificate_key /etc/ssl/private/secure.**example.com.key; > > ssl_session_timeout 5m; > > ssl_protocols SSLv2 SSLv3 TLSv1; > ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+** > HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; > ssl_prefer_server_ciphers on; > > location / { > proxy_pass http://127.0.0.1:80/; > proxy_redirect off; > } > > proxy_set_header Host $host; > proxy_set_header X-Real-IP $remote_addr; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > proxy_set_header X-From-SSL "On"; > proxy_max_temp_file_size 0; > } > > > > It is under the assumption that you servers ip is 192.168.10.12 and > Varnish occupy 127.0.0.1:80 also. In many cases it is good to add some > custom headers to make Varnish aware that it is infact decrypted SSL > traffic it is dealing with. > > > ______________________________**_________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/**lists/mailman/listinfo/**varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hugo.cisneiros at gmail.com Fri Aug 24 17:11:19 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Fri, 24 Aug 2012 14:11:19 -0300 Subject: can vcl.load continue with unused backends? In-Reply-To: <503396C6.8020405@gmx.com> References: <503396C6.8020405@gmx.com> Message-ID: On Tue, Aug 21, 2012 at 11:10 AM, Carlos Pe?as wrote: > I've found this [0] DenverCoder9's issue in the trac. In the resolution of > that issue its said "This has already been fixed in trunk where you can set > a parameter to turn these errors into warnings.//" > > Well, I'm trying to find that option but in the ticket there's any clues. I > also checked the docs and varnishd man page but still can't find any > reference. > > I'm using varnish 3.0.x from apt packages. There's a way to compile a VCL > with a backend defined but not assined? Did you find the option? Well, a workaround that I sometimes use is to simply set a req.backend, but not use it, like: set req.backend = be_unused; set req.backend = be_original; Or if (req.http.host == "veryfakeandinvalidhost") { set req.backend = be_unused; } This way the backend is used by VCL but not used at all on the logic. :P -- []'s Hugo www.devin.com.br From jcpetit at syspark.com Sun Aug 26 04:00:57 2012 From: jcpetit at syspark.com (Jean-Christophe Petit) Date: Sun, 26 Aug 2012 00:00:57 -0400 Subject: varnishlog: missing separator line from 2.1.5 to 3.0.2 Message-ID: <50399F79.2080508@syspark.com> Hello everyone, with "varnishlog -c -o" from version 2.1.5, we have an empty line separating each log entries group by request ID (which makes it easier to read) This empty line is gone in 3.0.2, why is that ? It was a very convenient way of parsing data (as mentioned in https://www.varnish-cache.org/trac/wiki/VarnishlogExamples ): varnishlog -c -o|perl -ne 'BEGIN { $/ = "";} print if (/RxURL.*\/$/m);' We find a work around in varnish-3.0.2: varnishlog -c -o|awk '{if ($1!=a) {print ""}print $0}{a=$1}'|perl -ne 'BEGIN { $/ = "";} print if (/RxURL.*\/$/m);' Would it be great to have the same thing in 3.0.2 or at least through an additional parameter ? Have a good day, Jean-Christophe Petit Syspark inc. -- Jean-Christophe Petit Syspark inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From flatcircle at hotmail.com Mon Aug 27 11:03:19 2012 From: flatcircle at hotmail.com (Flat Circle) Date: Mon, 27 Aug 2012 13:03:19 +0200 Subject: Varnish client IP address twice in Apache logs Message-ID: Hello I just added sub vcl_recv { # Add a unique header containing the client address remove req.http.X-Forwarded-For; set req.http.X-Forwarded-For = client.ip; # [...] }to my configuration to see the client IP in my Apache logs. So far so good... However, when view my Apache log file, I see the IP address twice. 10.4.1.37, 10.4.1.37 - - [27/Aug/2012:12:09:00 +0200] "GET /sites/dev.local/themes/test/favicon.ico HTTP/1.1" 200 1406 " How can I prevent that the IP address will appear once? Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ml at fatbsd.com Mon Aug 27 13:45:53 2012 From: ml at fatbsd.com (=?ISO-8859-1?B?Suly9G1lIExveWV0?=) Date: Mon, 27 Aug 2012 15:45:53 +0200 Subject: vcl_hash: hash post content ? Message-ID: Hello varnish-misc, I want to cache POST requests and add the post content to the hash in vcl_hash: is it possible with varnish 3 ? Thanks for the answer. ++ Jerome -------------- next part -------------- An HTML attachment was scrubbed... URL: From kokoniimasu at gmail.com Mon Aug 27 14:37:50 2012 From: kokoniimasu at gmail.com (kokoniimasu) Date: Mon, 27 Aug 2012 23:37:50 +0900 Subject: vcl_hash: hash post content ? In-Reply-To: References: Message-ID: Hi, J?r?me. VCL can't access the POST data. But, VMOD can do it. --vmod-parsereq https://github.com/xcir/libvmod-parsereq --vcl import parsereq; sub vcl_recv{ parsereq.init(); } sub vcl_hash{ hash_data(parsereq.post_header("hogehoge")); } Hope this helps, -- Syohei Tanaka(@xcir) http://xcir.net/ (:3[__]) 2012/8/27 J?r?me Loyet : > Hello varnish-misc, > > I want to cache POST requests and add the post content to the hash in > vcl_hash: is it possible with varnish 3 ? > > Thanks for the answer. > > ++ Jerome > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From shib4u at gmail.com Mon Aug 27 17:42:05 2012 From: shib4u at gmail.com (Shibashish) Date: Mon, 27 Aug 2012 10:42:05 -0700 Subject: Varnish client IP address twice in Apache logs In-Reply-To: References: Message-ID: On Mon, Aug 27, 2012 at 4:03 AM, Flat Circle wrote: > Hello > > I just added > > sub vcl_recv { > # Add a unique header containing the client address > remove req.http.X-Forwarded-For; > set req.http.X-Forwarded-For = client.ip; > # [...] > } > > to my configuration to see the client IP in my Apache logs. So far so > good... > > However, when view my Apache log file, I see the IP address twice. > > 10.4.1.37, 10.4.1.37 - - [27/Aug/2012:12:09:00 +0200] "GET > /sites/dev.local/themes/test/favicon.ico HTTP/1.1" 200 1406 " > > How can I prevent that the IP address will appear once? > > Regards. > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > Check the LogFormat parameter in httpd.conf -------------- next part -------------- An HTML attachment was scrubbed... URL: From connor.walls at skillpages.com Tue Aug 28 17:00:00 2012 From: connor.walls at skillpages.com (Connor Walls) Date: Tue, 28 Aug 2012 18:00:00 +0100 Subject: Out of memory exception on Varnish 2.1.5 In-Reply-To: References: Message-ID: Hi, We're still looking in to solving this issue, but I'm confused as to what's causing the problem. If the memory allocated to Varnish fills up is it expected to crash like this? Or under what circumstances will it crash if the memory fills up? I thought the very nature of running it in two processes prevented these kind of situations where it needs to be manually restarted? Thanks for all your help so far, Connor Walls From: Per Buer [mailto:perbu at varnish-software.com] Sent: 22 August 2012 16:12 To: Connor Walls Cc: varnish-misc at varnish-cache.org Subject: Re: Out of memory exception on Varnish 2.1.5 Hi Connor, On Wed, Aug 22, 2012 at 3:49 PM, Connor Walls > wrote: Hi, We've recently been having problems with varnish being killed with out of memory problems, our logs show information like this: This is not a bug in Varnish. It is most probably a misconfiguration. You either have to little memory in your system or you are asking Varnish to use too much. I'm guessing you are using -s malloc. Remember that there is a 1k overhead on each object stored in Varnish. (..) Now, we've been planning from Varnish 2.1.5 to 3.0 for a while, and we're hoping that this will solve our issues, but I just want to check if there are known OOM issues in 2.1.5, or is the problem likely to persist after upgrading to 3.0? It will probably persist. -- [cid:~WRD000.jpg] Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer Varnish makes websites fly! Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: ~WRD000.jpg URL: From Travis.Crowder at penton.com Tue Aug 28 17:08:21 2012 From: Travis.Crowder at penton.com (Crowder, Travis) Date: Tue, 28 Aug 2012 17:08:21 +0000 Subject: Varnish reload -- stop using existing config Message-ID: I saw the following message in the mail archives, but I did not see a response. Is there a way to force clients to use a new config after a reload? Thanks, Travis When switching to a new config, how does Varnish handle a new request that re-uses an existing (persistent, keep-alive) client connection? In other words, given a persistent connection, does Varnish handle further requests using the old config or the new config? Based on "man varnishd", I believe that Varnish will always use the new config, regardless of keep-alives. Here's the quote that makes me think so, from the section detailing the "vcl.use configname" option: "Start using the configuration specified by configname for all new requests. Existing requests will con? tinue using whichever configuration was in use when they arrived." If I'm wrong about this, I'd appreciate somebody letting me know. Also, is it possible to change this behavior? Can Varnish handle config reloads similar to how Apache's "graceful" restarts work? (I.e., continue using the old config for new requests on existing connections, so that any given client doesn't experience the config change until the connection breaks.) -Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From drais at icantclick.org Tue Aug 28 17:18:54 2012 From: drais at icantclick.org (david raistrick) Date: Tue, 28 Aug 2012 13:18:54 -0400 (EDT) Subject: Varnish reload -- stop using existing config In-Reply-To: References: Message-ID: On Tue, 28 Aug 2012, Crowder, Travis wrote: > I saw the following message in the mail archives, but I did not see a > response. > > Is there a way to force clients to use a new config after a reload? (based on 2.1, no experience with 3.x) There was no reload function in the rhel init.d script, so we built one in using http://kristianlyng.wordpress.com/2009/02/18/easy-reloading-of-varnish-vcl/ as a guide Something this doesn't mention is that you'll want to do a vcl.discard oldconfig don't forget about the "boot" config as well - vcl.list to get a list of the configs in place. It was mentioned at the time that you may want a short sleep before the discard due to some bugs that may have already been fixed.... anyway - I'd try that. ;) -- david raistrick http://www.netmeister.org/news/learn2quote.html drais at icantclick.org ascii ribbon campaign - stop html mail http://www.asciiribbon.org/ From perbu at varnish-software.com Wed Aug 29 21:41:56 2012 From: perbu at varnish-software.com (Per Buer) Date: Wed, 29 Aug 2012 23:41:56 +0200 Subject: Out of memory exception on Varnish 2.1.5 In-Reply-To: References: Message-ID: Hi Connor. As I said: You either have to little memory in your system or you are asking Varnish to use too much. I'm guessing you are using -s malloc. Remember that there is a 1k overhead on each object stored in Varnish. This isn't something Varnish does. It is something the kernel does. Varnish might trigger it because of the way Varnish or your system is configured. The kernel uses The Big Shotgun to clear memory and that might explain why Varnish is a bit dazed and confused afterwards. You want to avoid this situation. So what you want to do: - Add memory - Add swap space - Reduce varnish memory usage (at least if you are using -s malloc) On Tue, Aug 28, 2012 at 7:00 PM, Connor Walls wrote: > Hi,**** > > ** ** > > We?re still looking in to solving this issue, but I?m confused as to > what?s causing the problem. If the memory allocated to Varnish fills up is > it expected to crash like this? Or under what circumstances will it crash > if the memory fills up? I thought the very nature of running it in two > processes prevented these kind of situations where it needs to be manually > restarted?**** > > ** ** > > Thanks for all your help so far,**** > > Connor Walls**** > > ** ** > > *From:* Per Buer [mailto:perbu at varnish-software.com] > *Sent:* 22 August 2012 16:12 > *To:* Connor Walls > *Cc:* varnish-misc at varnish-cache.org > *Subject:* Re: Out of memory exception on Varnish 2.1.5**** > > ** ** > > Hi Connor,**** > > On Wed, Aug 22, 2012 at 3:49 PM, Connor Walls > wrote:**** > > Hi,**** > > **** > > We?ve recently been having problems with varnish being killed with out of > memory problems, our logs show information like this:**** > > ** ** > > This is not a bug in Varnish. It is most probably a misconfiguration. You > either have to little memory in your system or you are asking Varnish to > use too much. I'm guessing you are using -s malloc. Remember that there is > a 1k overhead on each object stored in Varnish.**** > > ** ** > > **** > > (..) **** > > **** > > Now, we?ve been planning from Varnish 2.1.5 to 3.0 for a while, and we?re > hoping that this will solve our issues, but I just want to check if there > are known OOM issues in 2.1.5, or is the problem likely to persist after > upgrading to 3.0?**** > > ** ** > > It will probably persist.**** > > ** ** > > ** ** > > -- > [image: Description: Image removed by sender.]**** > > Per Buer > > Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer > *Varnish makes websites fly!***** > > Whitepapers | Video | > Twitter **** > > ** ** > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From smsmail at roadrunner.com Wed Aug 29 23:41:26 2012 From: smsmail at roadrunner.com (Mark Strickland) Date: Wed, 29 Aug 2012 19:41:26 -0400 Subject: RESTful API PHP 302 response Message-ID: <000001cd863f$ce5cc3e0$6b164ba0$@roadrunner.com> I have a RESTful API on my website that uses the Tonic.php frame work to create the API. I am running Apache2 and Varnish. The web site and the API works great, but the API returns a code 302 along with the data. It is causing the client apps to have trouble getting the data from the API. Is there any way to get a 200 response sent back? I though the below would stop the 302 response, but it is not. If you need more information or want to try the API let me know and I will send you the information. # Do not cache these paths. if (req.url ~ "^/status\.php$" || req.url ~ "^/update\.php$" || req.url ~ "^/admin$" || req.url ~ "^/admin/.*$" || req.url ~ "^/flag/.*$" || req.url ~ "^/munin/.*$" || req.url ~ "^.*/ajax/.*$" || req.url ~ "^.*/api/.*$" || req.url ~ "^.*/apidev/.*$" || req.url ~ "^.*/phpmyadmin/.*$" || req.url ~ "^.*/ahah/.*$") { return (pass); } Here is the headers I am getting back. HTTP/1.1 302 Found X-Varnish-Cache: MISS X-Varnish: 1548785385 Age: 0 Date: Wed, 29 Aug 2012 23:37:34 GMT Content-Length: 27173 Allow: PUT, GET X-Resource: TaskHandler Via: 1.1 varnish Content-Type: application/json Connection: close X-Powered-By: PHP/5.3.2-1ubuntu4.17 Server: Apache/2.2.14 (Ubuntu) -------------- next part -------------- An HTML attachment was scrubbed... URL: From kokoniimasu at gmail.com Thu Aug 30 00:33:17 2012 From: kokoniimasu at gmail.com (kokoniimasu) Date: Thu, 30 Aug 2012 09:33:17 +0900 Subject: RESTful API PHP 302 response In-Reply-To: <000001cd863f$ce5cc3e0$6b164ba0$@roadrunner.com> References: <000001cd863f$ce5cc3e0$6b164ba0$@roadrunner.com> Message-ID: Hi, Mark. sub vcl_fetch{ if(beresp.status == 302 && !beresp.http.Location){ set beresp.status = 200; set beresp.response = "OK"; } } This sample is updating for response status at VCL. But, I think better to look at your php code.... Hope this helps, -- Syohei Tanaka(@xcir) http://xcir.net/ (:3[__]) 2012/8/30 Mark Strickland : > I have a RESTful API on my website that uses the Tonic.php frame work to > create the API. I am running Apache2 and Varnish. The web site and the API > works great, but the API returns a code 302 along with the data. It is > causing the client apps to have trouble getting the data from the API. Is > there any way to get a 200 response sent back? I though the below would > stop the 302 response, but it is not. If you need more information or want > to try the API let me know and I will send you the information. > > > > # Do not cache these paths. > > if (req.url ~ "^/status\.php$" || > > req.url ~ "^/update\.php$" || > > req.url ~ "^/admin$" || > > req.url ~ "^/admin/.*$" || > > req.url ~ "^/flag/.*$" || > > req.url ~ "^/munin/.*$" || > > req.url ~ "^.*/ajax/.*$" || > > req.url ~ "^.*/api/.*$" || > > req.url ~ "^.*/apidev/.*$" || > > req.url ~ "^.*/phpmyadmin/.*$" || > > req.url ~ "^.*/ahah/.*$") { > > return (pass); > > } > > > > > > Here is the headers I am getting back. > > > > HTTP/1.1 302 Found > > X-Varnish-Cache: > > MISS > > X-Varnish: > > 1548785385 > > Age: > > 0 > > Date: > > Wed, 29 Aug 2012 23:37:34 GMT > > Content-Length: > > 27173 > > Allow: > > PUT, GET > > X-Resource: > > TaskHandler > > Via: > > 1.1 varnish > > Content-Type: > > application/json > > Connection: > > close > > X-Powered-By: > > PHP/5.3.2-1ubuntu4.17 > > Server: > > Apache/2.2.14 (Ubuntu) > > > > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From nbubingo at gmail.com Thu Aug 30 03:45:37 2012 From: nbubingo at gmail.com (=?GB2312?B?0qbOsLHz?=) Date: Thu, 30 Aug 2012 11:45:37 +0800 Subject: Is it possible to access the original request URL in the esi request? Message-ID: Hi, I have a question, Is it possible to access the original request URL in the esi request? We want to access the original URL's argument in the ESI request. We have tried to add the custom HTTP header in VCL like this: sub vcl_recv { set req.http.X-foo=req.url; } But the req.url is replaced by the ESI URL in the ESI request, not the original main request. Thanks. From Cornel.Vaideanu at greppysystems.com Thu Aug 30 07:00:33 2012 From: Cornel.Vaideanu at greppysystems.com (Cornel Vaideanu) Date: Thu, 30 Aug 2012 07:00:33 +0000 Subject: When setting a cookie, the old ones are lost Message-ID: Hello I am using Varnish 3 in in front of apache with php. I need to set a cookie in the browser every time the user doesn?t receive a 503 response I use the following code: if(resp.status != 503) { set resp.http.Set-Cookie = "my_error_cookie =false; expires: Session; path=/"; } The problem is that the cookies received from apache are rewritten, if I use this I never receive the PHPSESSID cookie. For debug proposes I added this code : set resp.http.X-Cookie-Debug = "Response cookie: " + resp.http.Set-Cookie; if(resp.status != 503) { set resp.http.Set-Cookie = " my_error_cookie=false; expires: Session; path=/"; } set resp.http.X-Cookie-Debug2 = "Response cookie2: " + resp.http.Set-Cookie; These are the headers that browser receives : 1. X-Cookie-Debug: Response cookie: PHPSESSID=egf2tthsj0fm2bmt1oircumgk6; path=/ 2. X-Cookie-Debug2: Response cookie2: my_error_cookie=false; expires: Session; path=/ And there is only one Set-Cookie header : Set-Cookie: my_error_cookie=false; expires: Session; path=/ Can you tell me how can I set a new cookie without losing the cookies that apache sends ? Thank you very much Cornel Vaideanu PHP Developer M: [http://greppysystems.com/ftp/logo.png] 17-19A, Ploiesti Street, Cluj-Napoca, Romania www.greppysystems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pprocacci at datapipe.com Thu Aug 30 07:32:09 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Thu, 30 Aug 2012 02:32:09 -0500 Subject: When setting a cookie, the old ones are lost In-Reply-To: References: Message-ID: <20120830073209.GJ44525@nat.myhome> You'll want to use the following vmod. https://github.com/varnish/libvmod-header ~Paul Don't On Thu, Aug 30, 2012 at 07:00:33AM +0000, Cornel Vaideanu wrote: > Hello > I am using Varnish 3 in in front of apache with php. I need to set > a cookie in the browser every time the user doesn't receive a 503 > response I use the following code: > > if(resp.status != 503) { > set resp.http.Set-Cookie = > "my_error_cookie =false; expires: Session; path=/"; > } > > The problem is that the cookies received from apache are rewritten, if > I use this I never receive the PHPSESSID cookie. For debug proposes I > added this code : > > set resp.http.X-Cookie-Debug = "Response cookie: " + > resp.http.Set-Cookie; > > if(resp.status != 503) { > > set resp.http.Set-Cookie = " > my_error_cookie=false; expires: Session; path=/"; > } > > set resp.http.X-Cookie-Debug2 = "Response cookie2: " + > resp.http.Set-Cookie; > > These are the headers that browser receives : > > 1. X-Cookie-Debug: > Response cookie: PHPSESSID=egf2tthsj0fm2bmt1oircumgk6; path=/ > 2. X-Cookie-Debug2: > Response cookie2: my_error_cookie=false; expires: Session; path=/ > > And there is only one Set-Cookie header : > Set-Cookie: > my_error_cookie=false; expires: Session; path=/ > > > Can you tell me how can I set a new cookie without losing the cookies > that apache sends ? > > Thank you very much > > Cornel Vaideanu > PHP Developer > M: > [logo.png] > 17-19A, Ploiesti Street, > Cluj-Napoca, Romania > [1]www.greppysystems.com > > References > > 1. http://greppysystems.com/ > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. From perbu at varnish-software.com Thu Aug 30 07:48:48 2012 From: perbu at varnish-software.com (Per Buer) Date: Thu, 30 Aug 2012 09:48:48 +0200 Subject: When setting a cookie, the old ones are lost In-Reply-To: References: Message-ID: Hi, On Thu, Aug 30, 2012 at 9:00 AM, Cornel Vaideanu < Cornel.Vaideanu at greppysystems.com> wrote: > > Can you tell me how can I set a new cookie without losing the cookies that > apache sends ? > The problem is that there can, according to the IETF, only one Set-Cookie header. What you want to so is to modify the exsisting set-cookie header. Something like: set resp.http.set-cookie = resp.http.set-cookie + ";foo=bar" You could add another Set-Cookie header as Paul proposed but that breaks the spec, all though it will probably work for at least 99% of the clients out there. Per. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Thu Aug 30 07:52:05 2012 From: perbu at varnish-software.com (Per Buer) Date: Thu, 30 Aug 2012 09:52:05 +0200 Subject: Is it possible to access the original request URL in the esi request? In-Reply-To: References: Message-ID: Hi Weibin, On Thu, Aug 30, 2012 at 5:45 AM, ??? wrote: > Hi, > > I have a question, Is it possible to access the original request URL > in the esi request? We want to access the original URL's argument in > the ESI request. > I'm guessing you could do it with the variable vmod. If I recall correctly it allocates memory from the session workspace. -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cornel.Vaideanu at greppysystems.com Thu Aug 30 08:13:58 2012 From: Cornel.Vaideanu at greppysystems.com (Cornel Vaideanu) Date: Thu, 30 Aug 2012 08:13:58 +0000 Subject: When setting a cookie, the old ones are lost In-Reply-To: References: , Message-ID: Hello Thank you for the advices, in this scenario I am forced to use a cookie because I want to make a 307 redirect every time varnish would send 503 to borwser, but I need to send a cookie to prevent redirect loops. If you have any solution for this, your advice will be highly appreciated. I tried this way: set resp.http.set-cookie = resp.http.set-cookie + ";foo=bar" but it didn't work for me. Are you sure this method should work or I am forced to use the vmod that Paul suggested ? Thank you very much ________________________________ From: Per Buer [perbu at varnish-software.com] Sent: Thursday, August 30, 2012 10:48 AM To: Cornel Vaideanu Cc: varnish-misc at varnish-cache.org Subject: Re: When setting a cookie, the old ones are lost Hi, On Thu, Aug 30, 2012 at 9:00 AM, Cornel Vaideanu > wrote: Can you tell me how can I set a new cookie without losing the cookies that apache sends ? The problem is that there can, according to the IETF, only one Set-Cookie header. What you want to so is to modify the exsisting set-cookie header. Something like: set resp.http.set-cookie = resp.http.set-cookie + ";foo=bar" You could add another Set-Cookie header as Paul proposed but that breaks the spec, all though it will probably work for at least 99% of the clients out there. Per. -- [http://www.varnish-software.com/sites/default/files/varnishsoft_white_190x47.png] Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer Varnish makes websites fly! Whitepapers | Video | Twitter Cornel Vaideanu PHP Developer M: [http://greppysystems.com/ftp/logo.png] 17-19A, Ploiesti Street, Cluj-Napoca, Romania www.greppysystems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pprocacci at datapipe.com Thu Aug 30 09:01:11 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Thu, 30 Aug 2012 04:01:11 -0500 Subject: When setting a cookie, the old ones are lost In-Reply-To: References: Message-ID: <20120830090111.GK44525@nat.myhome> The problem is simply with browsers interpreting set-cookie headers differently. While appending '; foo=bar' _should_ work, it _will not_ work in all browsers. All the major browsers that I've tested have worked with sending multiple set-cookie headers. That's not to say it's right, but it is to say it works _for me_. You need to for obvious reasons test this for yourself to confirm, but my solution has always been to add additional set-cookie headers (which you can accompish easily with that vmod). ~Paul On Thu, Aug 30, 2012 at 08:13:58AM +0000, Cornel Vaideanu wrote: > Hello > Thank you for the advices, in this scenario I am forced to use a > cookie because I want to make a 307 redirect every time varnish would > send 503 to borwser, but I need to send a cookie to prevent redirect > loops. > If you have any solution for this, your advice will be highly > appreciated. > I tried this way: set resp.http.set-cookie = resp.http.set-cookie + > ";foo=bar" > but it didn't work for me. Are you sure this method should work or I > am forced to use the vmod that Paul suggested ? > Thank you very much > __________________________________________________________________ > > From: Per Buer [perbu at varnish-software.com] > Sent: Thursday, August 30, 2012 10:48 AM > To: Cornel Vaideanu > Cc: varnish-misc at varnish-cache.org > Subject: Re: When setting a cookie, the old ones are lost > Hi, > On Thu, Aug 30, 2012 at 9:00 AM, Cornel Vaideanu > <[1]Cornel.Vaideanu at greppysystems.com> wrote: > > > Can you tell me how can I set a new cookie without losing the cookies > that apache sends ? > > The problem is that there can, according to the IETF, only one > Set-Cookie header. What you want to so is to modify the exsisting > set-cookie header. > Something like: > set resp.http.set-cookie = resp.http.set-cookie + ";foo=bar" > You could add another Set-Cookie header as Paul proposed but that > breaks the spec, all though it will probably work for at least 99% of > the clients out there. > Per. > -- > [varnishsoft_white_190x47.png] > Per Buer > Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer > Varnish makes websites fly! > [2]Whitepapers | [3]Video | [4]Twitter > > Cornel Vaideanu > PHP Developer > M: > [logo.png] > 17-19A, Ploiesti Street, > Cluj-Napoca, Romania > [5]www.greppysystems.com > > References > > 1. mailto:Cornel.Vaideanu at greppysystems.com > 2. http://www.varnish-software.com/whitepapers > 3. http://www.youtube.com/watch?v=x7t2Sp174eI > 4. https://twitter.com/varnishsoftware > 5. http://greppysystems.com/ > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. From Cornel.Vaideanu at greppysystems.com Thu Aug 30 10:54:49 2012 From: Cornel.Vaideanu at greppysystems.com (Cornel Vaideanu) Date: Thu, 30 Aug 2012 10:54:49 +0000 Subject: When setting a cookie, the old ones are lost In-Reply-To: <20120830090111.GK44525@nat.myhome> References: , <20120830090111.GK44525@nat.myhome> Message-ID: Hello I understand, thank you for the explanations. I have installed the vmod you suggested and it works now. I have also needed to compile varnish from sources. ( for feature help... ) Thank you ________________________________________ From: Paul A. Procacci [pprocacci at datapipe.com] Sent: Thursday, August 30, 2012 12:01 PM To: Cornel Vaideanu Cc: Per Buer; varnish-misc at varnish-cache.org Subject: Re: When setting a cookie, the old ones are lost The problem is simply with browsers interpreting set-cookie headers differently. While appending '; foo=bar' _should_ work, it _will not_ work in all browsers. All the major browsers that I've tested have worked with sending multiple set-cookie headers. That's not to say it's right, but it is to say it works _for me_. You need to for obvious reasons test this for yourself to confirm, but my solution has always been to add additional set-cookie headers (which you can accompish easily with that vmod). ~Paul On Thu, Aug 30, 2012 at 08:13:58AM +0000, Cornel Vaideanu wrote: > Hello > Thank you for the advices, in this scenario I am forced to use a > cookie because I want to make a 307 redirect every time varnish would > send 503 to borwser, but I need to send a cookie to prevent redirect > loops. > If you have any solution for this, your advice will be highly > appreciated. > I tried this way: set resp.http.set-cookie = resp.http.set-cookie + > ";foo=bar" > but it didn't work for me. Are you sure this method should work or I > am forced to use the vmod that Paul suggested ? > Thank you very much > __________________________________________________________________ > > From: Per Buer [perbu at varnish-software.com] > Sent: Thursday, August 30, 2012 10:48 AM > To: Cornel Vaideanu > Cc: varnish-misc at varnish-cache.org > Subject: Re: When setting a cookie, the old ones are lost > Hi, > On Thu, Aug 30, 2012 at 9:00 AM, Cornel Vaideanu > <[1]Cornel.Vaideanu at greppysystems.com> wrote: > > > Can you tell me how can I set a new cookie without losing the cookies > that apache sends ? > > The problem is that there can, according to the IETF, only one > Set-Cookie header. What you want to so is to modify the exsisting > set-cookie header. > Something like: > set resp.http.set-cookie = resp.http.set-cookie + ";foo=bar" > You could add another Set-Cookie header as Paul proposed but that > breaks the spec, all though it will probably work for at least 99% of > the clients out there. > Per. > -- > [varnishsoft_white_190x47.png] > Per Buer > Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer > Varnish makes websites fly! > [2]Whitepapers | [3]Video | [4]Twitter > > Cornel Vaideanu > PHP Developer > M: > [logo.png] > 17-19A, Ploiesti Street, > Cluj-Napoca, Romania > [5]www.greppysystems.com > > References > > 1. mailto:Cornel.Vaideanu at greppysystems.com > 2. http://www.varnish-software.com/whitepapers > 3. http://www.youtube.com/watch?v=x7t2Sp174eI > 4. https://twitter.com/varnishsoftware > 5. http://greppysystems.com/ > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. Cornel Vaideanu PHP Developer M: [http://greppysystems.com/ftp/logo.png] 17-19A, Ploiesti Street, Cluj-Napoca, Romania www.greppysystems.com From millennium.bug at gmail.com Thu Aug 30 11:44:10 2012 From: millennium.bug at gmail.com (=?ISO-8859-1?B?W0RpZ2l0YWxeRHVkZV0grg==?=) Date: Thu, 30 Aug 2012 16:44:10 +0500 Subject: varnish server-side caching Message-ID: Hi guys, I set up varnish 3.0.3 on my centos box. I have magento running on a website. Once the website is opened, it browses rapidly. But every time a new user lands on the website, it takes ages to load the first page. If varnish does server-side caching, shouldn't it pick up the index page from the cache and spit it out? Please suggest what I can do to make the initial hit on the website as speedy as the rest of the surfing hits. -- Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From millennium.bug at gmail.com Thu Aug 30 13:25:31 2012 From: millennium.bug at gmail.com (=?ISO-8859-1?B?W0RpZ2l0YWxeRHVkZV0grg==?=) Date: Thu, 30 Aug 2012 18:25:31 +0500 Subject: varnish server-side caching In-Reply-To: References: Message-ID: Can varnishreplay help me in this case? Can anyone give me a working example? On Thu, Aug 30, 2012 at 4:44 PM, [Digital^Dude] ? wrote: > Hi guys, > > I set up varnish 3.0.3 on my centos box. I have magento running on a > website. Once the website is opened, it browses rapidly. But every time a > new user lands on the website, it takes ages to load the first page. If > varnish does server-side caching, shouldn't it pick up the index page from > the cache and spit it out? > > Please suggest what I can do to make the initial hit on the website as > speedy as the rest of the surfing hits. > > -- > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From enno at tty.nl Thu Aug 30 13:36:08 2012 From: enno at tty.nl (Enno van Amerongen) Date: Thu, 30 Aug 2012 15:36:08 +0200 Subject: varnish server-side caching In-Reply-To: Message-ID: <20120830133608.34e4ef14@groupware.tty.nl> From: [Digital^Dude] ? [mailto:millennium.bug at gmail.com] Subject: varnish server-side caching Hi guys, I set up varnish 3.0.3 on my centos box. I have magento running on a website. Once the website is opened, it browses rapidly. But every time a new user lands on the website, it takes ages to load the first page. If varnish does server-side caching, shouldn't it pick up the index page from the cache and spit it out? Please suggest what I can do to make the initial hit on the website as speedy as the rest of the surfing hits. So, what does your VCL look like? what headers are you setting on the backend? what about cookies? Maybe this will help: https://www.varnish-cache.org/trac/wiki/VCLExampleCacheCookies Enno -------------- next part -------------- An HTML attachment was scrubbed... URL: From millennium.bug at gmail.com Thu Aug 30 13:41:14 2012 From: millennium.bug at gmail.com (=?ISO-8859-1?B?W0RpZ2l0YWxeRHVkZV0grg==?=) Date: Thu, 30 Aug 2012 18:41:14 +0500 Subject: varnish server-side caching In-Reply-To: <20120830133608.34e4ef14@groupware.tty.nl> References: <20120830133608.34e4ef14@groupware.tty.nl> Message-ID: My default.vcl is attached. On Thu, Aug 30, 2012 at 6:36 PM, Enno van Amerongen wrote: > ** > > *From:* [Digital^Dude] ? [mailto:millennium.bug at gmail.com] > *Subject:* varnish server-side caching > > > Hi guys, > > I set up varnish 3.0.3 on my centos box. I have magento running on a > website. Once the website is opened, it browses rapidly. But every time a > new user lands on the website, it takes ages to load the first page. If > varnish does server-side caching, shouldn't it pick up the index page from > the cache and spit it out? > > Please suggest what I can do to make the initial hit on the website as > speedy as the rest of the surfing hits. > > > So, what does your VCL look like? what headers are you setting on the > backend? what about cookies? > > Maybe this will help: > https://www.varnish-cache.org/trac/wiki/VCLExampleCacheCookies > > Enno > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: default.vcl Type: application/octet-stream Size: 7095 bytes Desc: not available URL: From millennium.bug at gmail.com Fri Aug 31 05:49:11 2012 From: millennium.bug at gmail.com (=?ISO-8859-1?B?W0RpZ2l0YWxeRHVkZV0grg==?=) Date: Fri, 31 Aug 2012 10:49:11 +0500 Subject: varnish server-side caching In-Reply-To: References: <20120830133608.34e4ef14@groupware.tty.nl> Message-ID: Every time I open the website from a different PC, the website loads from the backend. I can see that from the way the page loads, as well as from: varnishtop -b -i TxURL However, if I access the browsed pages again, it loads rapidly. Is this what varnish is meant to do? I mean, for server-side caching, it should load pages to each client from the same cache that is present on the server once it is created (as soon as the first visitor comes on the website.) And it should only expire the cache when TTL is reached. The result of this should be that the website should appear slow only for the very first visitor and not after that to any visitor until ttl. On Thu, Aug 30, 2012 at 6:41 PM, [Digital^Dude] ? wrote: > > My default.vcl is attached. > > > On Thu, Aug 30, 2012 at 6:36 PM, Enno van Amerongen wrote: > >> ** >> >> *From:* [Digital^Dude] ? [mailto:millennium.bug at gmail.com] >> *Subject:* varnish server-side caching >> >> >> Hi guys, >> >> I set up varnish 3.0.3 on my centos box. I have magento running on a >> website. Once the website is opened, it browses rapidly. But every time a >> new user lands on the website, it takes ages to load the first page. If >> varnish does server-side caching, shouldn't it pick up the index page from >> the cache and spit it out? >> >> Please suggest what I can do to make the initial hit on the website as >> speedy as the rest of the surfing hits. >> >> >> So, what does your VCL look like? what headers are you setting on the >> backend? what about cookies? >> >> Maybe this will help: >> https://www.varnish-cache.org/trac/wiki/VCLExampleCacheCookies >> >> Enno >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From perbu at varnish-software.com Fri Aug 31 13:15:02 2012 From: perbu at varnish-software.com (Per Buer) Date: Fri, 31 Aug 2012 15:15:02 +0200 Subject: varnish server-side caching In-Reply-To: References: <20120830133608.34e4ef14@groupware.tty.nl> Message-ID: Hi Owais, I would recommend that you read through these: https://www.varnish-cache.org/docs/3.0/tutorial/increasing_your_hitrate.html https://www.varnish-cache.org/docs/3.0/tutorial/cookies.html https://www.varnish-cache.org/docs/3.0/tutorial/vary.html I'm guessing you have a Vary: Cookie coming from the backend. Per. On Fri, Aug 31, 2012 at 7:49 AM, [Digital^Dude] ? wrote: > Every time I open the website from a different PC, the website loads from > the backend. I can see that from the way the page loads, as well as from: > varnishtop -b -i TxURL > However, if I access the browsed pages again, it loads rapidly. > > Is this what varnish is meant to do? I mean, for server-side caching, it > should load pages to each client from the same cache that is present on the > server once it is created (as soon as the first visitor comes on the > website.) > And it should only expire the cache when TTL is reached. > > The result of this should be that the website should appear slow only for > the very first visitor and not after that to any visitor until ttl. > > On Thu, Aug 30, 2012 at 6:41 PM, [Digital^Dude] ? < > millennium.bug at gmail.com> wrote: > >> >> My default.vcl is attached. >> >> >> On Thu, Aug 30, 2012 at 6:36 PM, Enno van Amerongen wrote: >> >>> ** >>> >>> *From:* [Digital^Dude] ? [mailto:millennium.bug at gmail.com] >>> *Subject:* varnish server-side caching >>> >>> >>> Hi guys, >>> >>> I set up varnish 3.0.3 on my centos box. I have magento running on a >>> website. Once the website is opened, it browses rapidly. But every time a >>> new user lands on the website, it takes ages to load the first page. If >>> varnish does server-side caching, shouldn't it pick up the index page from >>> the cache and spit it out? >>> >>> Please suggest what I can do to make the initial hit on the website as >>> speedy as the rest of the surfing hits. >>> >>> >>> So, what does your VCL look like? what headers are you setting on the >>> backend? what about cookies? >>> >>> Maybe this will help: >>> https://www.varnish-cache.org/trac/wiki/VCLExampleCacheCookies >>> >>> Enno >>> >>> >> > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -- Per Buer Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer *Varnish makes websites fly!* Whitepapers | Video | Twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From cmitasch at thomas-krenn.com Fri Aug 31 14:39:11 2012 From: cmitasch at thomas-krenn.com (Christoph Mitasch) Date: Fri, 31 Aug 2012 16:39:11 +0200 (CEST) Subject: Output Buffering with Varnish Message-ID: <516401598.216135.1346423951585.JavaMail.root@thomas-krenn.com> Hello, I'm using Varnish 3.0.2-2~bpo60+1 on Debian Squeeze. The following PHP code behaves differently when Varnish is used. The output is returned after 10 seconds at once. When Varnish is not used, an output is returned every second. How can Varnish be configured that scripts making use of output buffering are working as expected? Thank you, Christoph From pprocacci at datapipe.com Fri Aug 31 14:58:33 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Fri, 31 Aug 2012 09:58:33 -0500 Subject: Output Buffering with Varnish In-Reply-To: <516401598.216135.1346423951585.JavaMail.root@thomas-krenn.com> References: <516401598.216135.1346423951585.JavaMail.root@thomas-krenn.com> Message-ID: <20120831145833.GA12138@nat.myhome> `man vcl` ############ beresp.do_stream Deliver the object to the client directly without fetching the whole object into varnish. If this request is pass'ed it will not be stored in memory. As of Varnish Cache 3.0 the object will marked as busy as it is delivered so only client can access the object. ############ This probably does what you want. ~Paul On Fri, Aug 31, 2012 at 04:39:11PM +0200, Christoph Mitasch wrote: > Hello, > > I'm using Varnish 3.0.2-2~bpo60+1 on Debian Squeeze. > > The following PHP code behaves differently when Varnish is used. The output is returned after 10 seconds at once. When Varnish is not used, an output is returned every second. > echo "started"; > for ($i=0;$i<10;$i++) { > echo "+++"; > echo str_repeat(" ", 4096); > sleep(1); > flush(); > ob_flush(); > } > echo "stopped"; > ?> > > How can Varnish be configured that scripts making use of output buffering are working as expected? > > Thank you, > Christoph > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. From cmitasch at thomas-krenn.com Fri Aug 31 18:57:51 2012 From: cmitasch at thomas-krenn.com (Christoph Mitasch) Date: Fri, 31 Aug 2012 20:57:51 +0200 (CEST) Subject: Output Buffering with Varnish In-Reply-To: <20120831145833.GA12138@nat.myhome> Message-ID: <1643260013.216804.1346439471645.JavaMail.root@thomas-krenn.com> great, that works! One thing is open now, the same request can only be delivered to one client at a time. Any ideas? Christoph ----- Urspr?ngliche Mail ----- Von: "Paul A. Procacci" An: "Christoph Mitasch" CC: varnish-misc at varnish-cache.org Gesendet: Freitag, 31. August 2012 16:58:33 Betreff: Re: Output Buffering with Varnish `man vcl` ############ beresp.do_stream Deliver the object to the client directly without fetching the whole object into varnish. If this request is pass'ed it will not be stored in memory. As of Varnish Cache 3.0 the object will marked as busy as it is delivered so only client can access the object. ############ This probably does what you want. ~Paul On Fri, Aug 31, 2012 at 04:39:11PM +0200, Christoph Mitasch wrote: > Hello, > > I'm using Varnish 3.0.2-2~bpo60+1 on Debian Squeeze. > > The following PHP code behaves differently when Varnish is used. The output is returned after 10 seconds at once. When Varnish is not used, an output is returned every second. > echo "started"; > for ($i=0;$i<10;$i++) { > echo "+++"; > echo str_repeat(" ", 4096); > sleep(1); > flush(); > ob_flush(); > } > echo "stopped"; > ?> > > How can Varnish be configured that scripts making use of output buffering are working as expected? > > Thank you, > Christoph > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. From jeanchristophe.petit at gmail.com Sun Aug 26 03:59:25 2012 From: jeanchristophe.petit at gmail.com (jean christophe petit) Date: Sun, 26 Aug 2012 03:59:25 -0000 Subject: varnishlog: missing separator line from 2.1.5 to 3.0.2 Message-ID: Hello everyone, with "varnishlog -c -o" from version 2.1.5, we have an empty line separating each log entries group by request ID (which makes it easier to read) This empty line is gone in 3.0.2, why is that ? It was a very convenient way of parsing data (as mentioned in https://www.varnish-cache.org/trac/wiki/VarnishlogExamples ): varnishlog -c -o|perl -ne 'BEGIN { $/ = "";} print if (/RxURL.*\/$/m);' We find a work around in varnish-3.0.2: varnishlog -c -o|awk '{if ($1!=a) {print ""}print $0}{a=$1}'|perl -ne 'BEGIN { $/ = "";} print if (/RxURL.*\/$/m);' Would it be great to have the same thing in 3.0.2 or at least through an additional parameter ? Have a good day, Jean-Christophe Petit Syspark inc. From Eduard.Luca at greppysystems.com Thu Aug 30 11:46:28 2012 From: Eduard.Luca at greppysystems.com (Eduard Luca) Date: Thu, 30 Aug 2012 11:46:28 -0000 Subject: Varnish 503 error: invalid gzip data: incorrect header check Message-ID: <26613DA30B34ED41AE2B91834CE2A7541CEC4F4B@GS-Server.office.greppysystems.com> Hello, I am receiving a weird error on Varnish 3.0.2, which ends up in images/css/js/fonts not being fetched by the browser, Varnish giving a 503 error on the files. I have set up my logs and found the error message Varnish reports. A small part of the logs is at http://pastebin.com/SEyWnRkS (didn't want to spam the email with all the content of the log). As you can see, I get the following error: 13 FetchError c Invalid Gzip data: incorrect header check 13 FetchError c straight read_error: -1 0 (See other message) I haven't been able to find much about this error, except for 1 person who also didn't find any solution to this. I've disabled my GZip encoding on my backend (Apache), but it had no effect, so I am guessing it's from the GZip encoding on Varnish's end. Did anyone stumble upon this error & fixed it or am I the only one out here? :) Thank you, Eduard Luca Eduard Luca M: +40752189595 [http://greppysystems.com/ftp/logo.png] 17-19A, Ploiesti Street, Cluj-Napoca, Romania www.greppysystems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: