From abraham.sustaita at buscacorp.com Mon Jul 2 18:24:42 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Mon, 2 Jul 2012 11:24:42 -0700 Subject: Problem with Amazon S3 and varnish In-Reply-To: References: Message-ID: I was able to fix this problem. Amazon have some issues when using -website-us-east-1 so the only thing I had to do was remove that from the name of all the buckets and now it is working as it have to work. My vcl now is this: backend app01 { .host = "app01.site.com"; .port = "80"; .connect_timeout = 1.5s; .first_byte_timeout = 45s; .between_bytes_timeout = 30s; .probe = { .url = "/"; .interval = 5s; .timeout = 1s; .window = 5; .threshold = 3; } } backend app02 { .host = "app02.site.com"; .port = "80"; .connect_timeout = 1.5s; .first_byte_timeout = 45s; .between_bytes_timeout = 30s; .probe = { .url = "/"; .interval = 5s; .timeout = 1s; .window = 5; .threshold = 3; } } backend app03 { .host = "app03.site.com"; .port = "80"; .connect_timeout = 1.5s; .first_byte_timeout = 45s; .between_bytes_timeout = 30s; .probe = { .url = "/"; .interval = 5s; .timeout = 1s; .window = 5; .threshold = 3; } } backend app04 { .host = "app04.site.com"; .port = "80"; .connect_timeout = 1.5s; .first_byte_timeout = 45s; .between_bytes_timeout = 30s; .probe = { .url = "/"; .interval = 5s; .timeout = 1s; .window = 5; .threshold = 3; } } backend app05 { .host = "app05.site.com"; .port = "80"; .connect_timeout = 1.5s; .first_byte_timeout = 45s; .between_bytes_timeout = 30s; .probe = { .url = "/"; .interval = 5s; .timeout = 1s; .window = 5; .threshold = 3; } } director app_director round-robin { { .backend = app01; } { .backend = app02; } { .backend = app03; } { .backend = app04; } { .backend = app05; } } # Amazon S3 Backend site4 # -- backend s3 { .host = "site4.s3.amazonaws.com"; .port = "80"; } # Amazon S3 Backend site3 # -- backend s3sdr { .host = "site3.s3.amazonaws.com"; .port = "80"; } # Amazon S3 Backend site2 # -- backend s3lvl { .host = "site2.s3.amazonaws.com"; .port = "80"; } # Amazon S3 Backend site1 # -- backend s3gam { .host = "site1.s3.amazonaws.com"; .port = "80"; } #acl internal { # "localhost"; # "127.0.0.1"; #} acl purge { "localhost"; "192.168.11.0"/24; } sub vcl_recv { if (req.request == "PURGE") { if (!client.ip ~ purge) { error 405 "Not allowed."; } ban("req.url = " + req.url); return (lookup); } set req.backend = app_director; # Peticion a site4 if (req.http.Host == "s3.site4.site.com" && req.url ~ "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)$") { unset req.http.cookie; unset req.http.cache-control; unset req.http.pragma; unset req.http.expires; unset req.http.etag; unset req.http.X-Forwarded-For; set req.backend = s3; set req.http.host = "site4.s3.amazonaws.com"; return (lookup); } #Peticion a site3 if (req.http.Host == "s3.site3.site.com" && req.url ~ "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)$") { unset req.http.cookie; unset req.http.cache-control; unset req.http.pragma; unset req.http.expires; unset req.http.etag; unset req.http.X-Forwarded-For; set req.backend = s3sdr; set req.http.host = "site3.s3.amazonaws.com"; return (lookup); } #Peticion a site2 if (req.http.Host == "s3.site2.site.com" && req.url ~ "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)$") { unset req.http.cookie; unset req.http.cache-control; unset req.http.pragma; unset req.http.expires; unset req.http.etag; unset req.http.X-Forwarded-For; set req.backend = s3lvl; set req.http.host = "site2.s3.amazonaws.com"; return (lookup); } #Peticion a site1 if (req.http.Host == "s3.site1.site.com" && req.url ~ "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)$") { unset req.http.cookie; unset req.http.cache-control; unset req.http.pragma; unset req.http.expires; unset req.http.etag; unset req.http.X-Forwarded-For; set req.backend = s3gam; set req.http.host = "site1.s3.amazonaws.com"; return (lookup); } # Use anonymous, cached pages if all backends are down. if (! req.backend.healthy) { unset req.http.Cookie; set req.grace = 1h; } else { set req.grace = 30s; } # Add the X-Forwarded-For header # -- if (req.restarts == 0) { if (req.http.x-forwarded-for) { set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; } else { set req.http.X-Forwarded-For = client.ip; } } # Sanely handle the request based on the type # -- if (req.request != "GET" && req.request != "HEAD" && req.request != "PUT" && req.request != "POST" && req.request != "TRACE" && req.request != "OPTIONS" && req.request != "DELETE") { /* Non-RFC2616 or CONNECT which is weird. */ return (pipe); } # Request by post needs no cache # -- if (req.request == "POST") { return (pass); } # Admin needs no cache # -- if (req.http.Host ~ "(?i)^(admin.)?site.com") { return (pass); } # Always cache the following file types for all users. if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|flv|avi|mov|wmv|css|js|html|htm)(\?[a-z0-9]+)?$") { unset req.http.Cookie; return (lookup); } # Login and logout needs no cache # -- if (req.url ~ "^/usuario/salir" || req.url ~ "^/usuario/redirectWindow" || req.url ~ "^/usuario/al") { return (pass); } # No save at cache the user profile if (req.url ~ "^/usuario/([0-9]+)/(.*?)/") { return (pass); } # Requests to /no-cache/ needs no cache # -- if (req.request == "GET" && req.url ~ "^/no-cache") { return (pass); } if (req.request == "GET" && req.url ~ "^/rss/") { return (pass); } # Not sure what could match here, but it's in the default.vcl # -- if (req.request != "GET" && req.request != "HEAD") { /* We only deal with GET and HEAD by default */ return (pass); } # Handle compression correctly. Different browsers send different # "Accept-Encoding" headers, even though they mostly all support the same # compression mechanisms. By consolidating these compression headers into # a consistent format, we can reduce the size of the cache and get more hits.= # @see: http:// varnish.projects.linpro.no/wiki/FAQ/Compression if (req.http.Accept-Encoding) { if (req.http.Accept-Encoding ~ "gzip") { # If the browser supports it, we'll use gzip. set req.http.Accept-Encoding = "gzip"; } else if (req.http.Accept-Encoding ~ "deflate") { # Next, try deflate if it is supported. set req.http.Accept-Encoding = "deflate"; } else { # Unknown algorithm. Remove it and send unencoded. unset req.http.Accept-Encoding; } } # Cache all requests by default, overriding the standard Varnish behavior if (req.request == "GET" || req.request == "HEAD") { /* We only deal with GET and HEAD by default */ #unset req.http.Cookie; return (lookup); } # If there's a cookie left aft this point do not cache # or is this easier to keep in the cookie deletion above? # -- if (req.http.Authorization || req.http.Cookie) { /* Not cacheable by default */ return (pass); } # If we get here, try the cache # -- return (lookup); } sub vcl_pipe { return (pipe); } sub vcl_pass { return (pass); } sub vcl_hash { # Include cookie in cache hash. # This check is unnecessary because we already pass on all cookies. #if (req.http.Cookie) { # #set req.hash += req.http.Cookie; # hash_data(req.http.Cookie); #} } sub vcl_hit { if (req.request == "PURGE") { purge; error 200 "Purged"; } } sub vcl_miss { if (req.request == "PURGE") { purge; error 200 "Purged"; } } sub vcl_fetch { # S3 Site4 # -- if (req.http.Host == "s3.site4.site.com" && req.url ~ "\.(flv|mp4|jpg)(\?[a-z0-9]+)$") { remove beresp.http.x-amz-id-2; remove beresp.http.x-amz-request-id; set beresp.ttl = 1w; set beresp.grace = 30s; if (beresp.status != 200) { return (error); } } # S3 Site3 # -- if (req.http.Host == "s3.site3.site.com" && req.url ~ "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)$") { remove beresp.http.x-amz-id-2; remove beresp.http.x-amz-request-id; set beresp.ttl = 1w; set beresp.grace = 30s; if (beresp.status != 200) { return (error); } } # S3 site2 # -- if (req.http.Host == "s3.site2.site.com" && req.url ~ "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)$") { remove beresp.http.x-amz-id-2; remove beresp.http.x-amz-request-id; set beresp.ttl = 1w; set beresp.grace = 30s; if (beresp.status != 200) { return (error); } } # S3 site1 # -- if (req.http.Host == "s3.site1.site.com" && req.url ~ "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)$") { remove beresp.http.x-amz-id-2; remove beresp.http.x-amz-request-id; set beresp.ttl = 1w; set beresp.grace = 30s; if (beresp.status != 200) { return (error); } } # remove all cookies # unset beresp.http.set-cookie; # cache for 12 hours # set beresp.ttl = 2h; # Don't allow static files to set cookies. if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|css|js|html|htm|mp4|flv)(\?[a-z0-9]+)?$") { unset beresp.http.set-cookie; set beresp.ttl = 12h; } else { set beresp.ttl = 30m; } # If the backend server doesn't return properly, don't send another connection to it # for 60s and try another backend via restart. # # https://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html # -- if(beresp.status == 500 || beresp.status == 503) { if (req.restarts > 3) { set beresp.saintmode = 5m; } if (req.request != "POST") { return(restart); } else { error 500 "Failed"; } } # Allow items to be stale if needed. set beresp.grace = 1h; } sub vcl_deliver { # if (resp.http.magicmarker) { # unset resp.http.magicmarker; # set resp.http.age = "0"; # } if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; } else { set resp.http.X-Cache = "MISS"; } return (deliver); } # In the event of an error, show friendlier messages. sub vcl_error { # Otherwise redirect to the homepage, which will likely be in the cache. set obj.http.Content-Type = "text/html; charset=utf-8"; synthetic {" ..:: Site :: Por el momento estamos en mantenimiento ::..
Estamos experimentando problemas. Vuelve más tarde.
(Error "} + obj.status + " " + obj.response + {")
"}; return (deliver); } sub vcl_init { return (ok); } sub vcl_fini { return (ok); } 2012/6/28 Hugo Cisneiros (Eitch) > On Wed, Jun 27, 2012 at 8:42 PM, Abraham Cruz Sustaita > wrote: > > I have this configuration: > > > > # Amazon S3 Backend Metatube > > # -- > > backend s3 { > > .host = "metatube.s3-website-us-east-1.amazonaws.com"; > > .port = "80"; > > } > > > > But the amazon url sometimes resolves to more of one IP (I guess is a > normal > > behaviour from Amazon), so I have to try several times to load the > > configuration file (via varnishadm) until it compiles correctly. The > problem > > is I have a 5 different domains with amazon, so when finally one of them > > resolves to just one IP, the others resolve to more than one, so I can > never > > compile the configuration file. Is there anyway to fix this via > > configuration? > > Currently varnish does not support multiple IPs on one backend. > There's no easy and native way to do this. Please see the mailing list > archives for many discussions and some approaches about this issue :) > > -- > []'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 abraham.sustaita at buscacorp.com Mon Jul 2 23:35:00 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Mon, 2 Jul 2012 16:35:00 -0700 Subject: Error on upgrading varnish 3.0 Message-ID: I have an error when trying to upgrade varnish 3.0. I need to upgrade it since it has a bug on version 3.0.2 revision 55e70a4 with big files. I need the version 3.0.3 but I have this error when trying to upgrade it: [root at var01 edgar]# yum update varnish http://repo.varnish-cache.org/redhat/varnish-3.0/el6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. Setting up Update Process No Packages marked for Update I checked the url it is checking and effectively there is no anything there. How can I upgrade the varnish version? http://repo.varnish-cache.org/redhat/varnish-3.0/el6/x86_64/repodata/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.vanarragon at lukkien.com Thu Jul 5 15:34:32 2012 From: j.vanarragon at lukkien.com (Jaap van Arragon) Date: Thu, 05 Jul 2012 17:34:32 +0200 Subject: Purge multiple varnish servers (cluster controller) Message-ID: Hello, We are considering a geographically distributed infrastructure with a varnish instance in several continents. Because we have multiple servers we want to make purge requests to all the servers at once (small delay is acceptable). There are a few posts about the cluster controller feature of Varnish ( https://www.varnish-cache.org/trac/wiki/CLI ) but I can?t seem to find any example for how to configure the cluster controller. Can someone show me an example config or are there other ideas about purging to multiple servers (our application doesn?t support the option for entering multiple IP addresses, because the IP are frequently changed and for every change we need to restart our application ;-( ) Thank you in advance Regards, Jaap van Arragon -------------- next part -------------- An HTML attachment was scrubbed... URL: From r at roze.lv Thu Jul 5 15:54:55 2012 From: r at roze.lv (Reinis Rozitis) Date: Thu, 5 Jul 2012 18:54:55 +0300 Subject: Purge multiple varnish servers (cluster controller) In-Reply-To: References: Message-ID: <1C13714776234761B89AB003CF9A6E84@DD21> Purge multiple varnish servers (cluster controller)> or are there other ideas about purging to multiple servers (our application doesn?t support the option for entering multiple IP addresses, because the IP are frequently changed and for every change we need to restart our application ;-( ) https://www.varnish-software.com/products/admin-console/cache-invalidation-api rr From apj at mutt.dk Thu Jul 5 18:31:43 2012 From: apj at mutt.dk (Andreas Plesner Jacobsen) Date: Thu, 5 Jul 2012 20:31:43 +0200 Subject: Purge multiple varnish servers (cluster controller) In-Reply-To: References: Message-ID: <20120705183142.GE12685@nerd.dk> On Thu, Jul 05, 2012 at 05:34:32PM +0200, Jaap van Arragon wrote: > > We are considering a geographically distributed infrastructure with a > varnish instance in several continents. Because we have multiple servers we > want to make purge requests to all the servers at once (small delay is > acceptable). There are a few posts about the cluster controller feature of > Varnish ( https://www.varnish-cache.org/trac/wiki/CLI ) but I can?t seem to > find any example for how to configure the cluster controller. It's just a "reverse" CLI connection. You'll either have to roll your own cluster controller or buy the Varnish Admin Console from Varnish Software. -- Andreas From lacrosse1991 at gmail.com Mon Jul 9 02:24:50 2012 From: lacrosse1991 at gmail.com (austin wonderly) Date: Sun, 8 Jul 2012 22:24:50 -0400 Subject: virtual hosts setup Message-ID: Hello, How can I go about setting up varnish for virtual hosts? I've tried the tutorial on the varnish-cache website https://github.com/mattiasgeniar/varnish-3.0-configuration-templates, but parts of the default vcl kept causing errors while compiling upon varnish startup (i am running version 2.1.3-8 on debian squeeze). Ideally, it would be great if I could setup varnish to switch in an entire config (receive, fetch, etc) from a separate vcl file if possible, any help would really be appreciated, thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Mon Jul 9 02:41:54 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Sun, 8 Jul 2012 19:41:54 -0700 Subject: virtual hosts setup In-Reply-To: References: Message-ID: You are following the guide for varnish 3.0 but You have varnish 2.1... It is the problem... El domingo, 8 de julio de 2012, austin wonderly escribi?: > Hello, How can I go about setting up varnish for virtual hosts? I've tried > the tutorial on the varnish-cache website > https://github.com/mattiasgeniar/varnish-3.0-configuration-templates, but > parts of the default vcl kept causing errors while compiling upon varnish > startup (i am running version 2.1.3-8 on debian squeeze). Ideally, it would > be great if I could setup varnish to switch in an entire config (receive, > fetch, etc) from a separate vcl file if possible, any help would really be > appreciated, thanks! -- 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lacrosse1991 at gmail.com Mon Jul 9 03:14:41 2012 From: lacrosse1991 at gmail.com (austin wonderly) Date: Sun, 8 Jul 2012 23:14:41 -0400 Subject: virtual hosts setup In-Reply-To: References: Message-ID: would it be recommended to upgrade to 3.x? On Sun, Jul 8, 2012 at 10:41 PM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > You are following the guide for varnish 3.0 but You have varnish 2.1... It > is the problem... > > El domingo, 8 de julio de 2012, austin wonderly escribi?: > > Hello, How can I go about setting up varnish for virtual hosts? I've tried >> the tutorial on the varnish-cache website >> https://github.com/mattiasgeniar/varnish-3.0-configuration-templates, >> but parts of the default vcl kept causing errors while compiling upon >> varnish startup (i am running version 2.1.3-8 on debian squeeze). Ideally, >> it would be great if I could setup varnish to switch in an entire config >> (receive, fetch, etc) from a separate vcl file if possible, any help would >> really be appreciated, thanks! > > > > -- > > 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. > > > _______________________________________________ > 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 aaron.desouza at talk21.com Mon Jul 9 11:35:11 2012 From: aaron.desouza at talk21.com (Aaron de Souza) Date: Mon, 9 Jul 2012 12:35:11 +0100 (BST) Subject: Varnish returning incorrect page In-Reply-To: <1341833398.65236.YahooMailNeo@web87103.mail.ird.yahoo.com> References: <1341833398.65236.YahooMailNeo@web87103.mail.ird.yahoo.com> Message-ID: <1341833711.39679.YahooMailNeo@web87104.mail.ird.yahoo.com> Hi, I'm running Varnish 3.0.2 on an Ubuntu 10.04 Server. I have a strange problem with Varnish in that it is returning the wrong page for particular URLs. For example, I have URLs like http://mydomain.com/events/booking/20120907 http://mydomain.com/events/booking/20120905 http://mydomain.com/events/booking/20120904 http://mydomain.com/events/booking/20120717 http://mydomain.com/events/booking/20120713 If I first visited the url /events/booking/20120905 it caches the page and then if I then visited /events/booking/20120907it returns the cached page for /events/booking/20120905. If I then try and visit /events/booking/20120717 the correct page is returned and cached, but the if I visit /events/booking/20120713, the cached page for /events/booking/20120717 is returned. It seems like pages are being hashed with the last two digits of the URL ignored (does that make sense ?!?). Has anyone come across behaviour like this before? Many thanks Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaspergrubbe at gmail.com Mon Jul 9 14:51:04 2012 From: kaspergrubbe at gmail.com (Kasper Grubbe) Date: Mon, 9 Jul 2012 16:51:04 +0200 Subject: Using ESI-tags inside a cached object In-Reply-To: References: Message-ID: I am following the guide here: https://www.varnish-cache.org/docs/trunk/tutorial/esi.html I have two pages in my project as of now: 1. http://127.0.0.1:3001/ (Cache-Control:max-age=60, private): Cached: <%= Time.now %>
ESI:
2. http://127.0.0.1:3001/staticview (Cache-Control:max-age=1, private): <%= Time.now %> However, every time I request the first page, it seems like it also caches the ESI-include result for the 60 seconds instead of refreshing every second. First request: Cached: 2012-07-09 01:31:12 +0200 ESI: 2012-07-09 01:31:12 +0200 Second request (10 seconds later): Cached: 2012-07-09 01:31:12 +0200 ESI: 2012-07-09 01:31:12 +0200 Third request (about a minute later): Cached: 2012-07-09 01:32:19 +0200 ESI: 2012-07-09 01:32:19 +0200 Is this expected? Or am I misunderstanding the documentation? My VCL config looks like this: backend default { .host = "127.0.0.1"; .port = "3000"; } sub vcl_recv { # Don't cache POST, PUT, or DELETE requests if (req.request == "POST" || req.request == "PUT" || req.request == "DELETE") { return(pass); } return(lookup); } sub vcl_fetch { # We want ESI set beresp.do_esi = true; if (beresp.http.Cache-Control ~ "max-age") { unset beresp.http.Set-Cookie; return(deliver); } # Do not deliver into cache otherwise. return(hit_for_pass); } sub vcl_deliver { if (obj.hits > 0) { set resp.http.X-Varnish-Cache = "HIT (" +obj.hits+ ")"; } else { set resp.http.X-Varnish-Cache = "MISS"; } } Varnish is running with these parameters: varnishd -F -a 127.0.0.1:3001 -f config/varnish/development.vcl My Varnish version is this (running on Mac OS X, with Varnish from the Homebrew repo): varnishd (varnish-3.0.2 revision 55e70a4) Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2011 Varnish Software AS -- Kasper Grubbe Phone: (+45) 42 42 42 74 Skype: kasper.grubbe Mail: kaspergrubbe at gmail.com Web: http://kaspergrubbe.dk From abraham.sustaita at buscacorp.com Mon Jul 9 16:38:16 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Mon, 9 Jul 2012 09:38:16 -0700 Subject: How to include inside vcl_recv Message-ID: How should I include a file inside vcl_recv? I have this: # Main File # Version: 1.0.0.07092011 # Backends include "backend.vcl" # Amazon Backends include "amazon.vcl" acl purge { "localhost"; "192.168.11.0"/24; } # vcl_recv include "vcl_recv.vcl" And inside the file vcl_recv.vcl I want to configure some things, but making includes of other files. Can I do it? -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Mon Jul 9 16:57:38 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Mon, 9 Jul 2012 09:57:38 -0700 Subject: How to match domains starting with "admin" Message-ID: I have several sites on my servers, so I need to configure one admin subdomain for each one. However, I don't want to make: if (req.http.Host ~ "(?i)(admin.domain1.com|admin.domain2.com| admin.domainN.com)?$") {} Can I do this only with one regular expression of the type (admin\.(.*)) ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.tailor at gmail.com Mon Jul 9 19:37:41 2012 From: nick.tailor at gmail.com (nick tailor) Date: Mon, 9 Jul 2012 12:37:41 -0700 Subject: Varnish Grace Question? Message-ID: Hello, So, I used this link http://www.lullabot.com/articles/varnish-multiple-web-servers-drupal to setup my varnish stuff. Made some minor adjustments to the probes, however if I stop stop one of my webservers to see if the content my varnish serves is from the cache, it just shows a page service unavailble, and from what I've read you need to have the grace mode stuff in there, which this default vcl for version 3 does. Anyone, have any ideas why my Drupal sites are not serving cached? when my backend are down. ===================================================== # Respond to incoming requests. sub vcl_recv { # Allow the backend to serve up stale content if it is responding slowly. set req.grace = 6h; } # Code determining what to do when serving items from the Apache servers. sub vcl_fetch { # Allow items to be stale if needed. set beresp.grace = 6h; } ===================================================== Cheers Nick Tailor -------------- next part -------------- An HTML attachment was scrubbed... URL: From pprocacci at datapipe.com Mon Jul 9 19:47:36 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Mon, 9 Jul 2012 14:47:36 -0500 Subject: How to match domains starting with "admin" In-Reply-To: References: Message-ID: <20120709194736.GD1884@nat.myhome> On Mon, Jul 09, 2012 at 09:57:38AM -0700, Abraham Cruz Sustaita wrote: > I have several sites on my servers, so I need to configure one admin > subdomain for each one. However, I don't want to make: > > if (req.http.Host ~ > "(?i)([1]admin.domain1.com|[2]admin.domain2.com|[3]admin.domainN.com)?$ > ") {} > > Can I do this only with one regular expression of the type > (admin\.(.*)) ? > Something like the following will match anything prefix'd with `admin`. You'd have to include the suffixes manually. Luckily, there aren't too many tld's for this to be a major concern. ^admin\.[^\.]+\.(?=(com|net|org))$ You can capture the entire hostname by including grouping operators around the entire regex: ^(admin\.[^\.]+\.(com|net|org))$ ~Paul ________________________________ 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 pprocacci at datapipe.com Mon Jul 9 19:49:27 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Mon, 9 Jul 2012 14:49:27 -0500 Subject: How to match domains starting with "admin" In-Reply-To: <20120709194736.GD1884@nat.myhome> References: <20120709194736.GD1884@nat.myhome> Message-ID: <20120709194927.GE1884@nat.myhome> On Mon, Jul 09, 2012 at 02:47:36PM -0500, Paul A. Procacci wrote: > On Mon, Jul 09, 2012 at 09:57:38AM -0700, Abraham Cruz Sustaita wrote: > > I have several sites on my servers, so I need to configure one admin > > subdomain for each one. However, I don't want to make: > > > > if (req.http.Host ~ > > "(?i)([1]admin.domain1.com|[2]admin.domain2.com|[3]admin.domainN.com)?$ > > ") {} > > > > Can I do this only with one regular expression of the type > > (admin\.(.*)) ? > > > > Something like the following will match anything prefix'd with `admin`. > You'd have to include the suffixes manually. Luckily, there aren't too many > tld's for this to be a major concern. > > ^admin\.[^\.]+\.(?=(com|net|org))$ > > You can capture the entire hostname by including grouping operators > around the entire regex: > > ^(admin\.[^\.]+\.(com|net|org))$ > > ~Paul Sorry for the email to self here. The second regex was a bad copy/paste and should have been: ^(admin\.[^\.]+\.(?=(com|net|org)))$ ~Paul ________________________________ 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 abraham.sustaita at buscacorp.com Mon Jul 9 19:53:35 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Mon, 9 Jul 2012 12:53:35 -0700 Subject: How to match domains starting with "admin" In-Reply-To: <20120709194927.GE1884@nat.myhome> References: <20120709194736.GD1884@nat.myhome> <20120709194927.GE1884@nat.myhome> Message-ID: Thanks a lot! Let me try it 2012/7/9 Paul A. Procacci > On Mon, Jul 09, 2012 at 02:47:36PM -0500, Paul A. Procacci wrote: > > On Mon, Jul 09, 2012 at 09:57:38AM -0700, Abraham Cruz Sustaita wrote: > > > I have several sites on my servers, so I need to configure one admin > > > subdomain for each one. However, I don't want to make: > > > > > > if (req.http.Host ~ > > > "(?i)([1]admin.domain1.com|[2]admin.domain2.com|[3] > admin.domainN.com)?$ > > > ") {} > > > > > > Can I do this only with one regular expression of the type > > > (admin\.(.*)) ? > > > > > > > Something like the following will match anything prefix'd with `admin`. > > You'd have to include the suffixes manually. Luckily, there aren't too > many > > tld's for this to be a major concern. > > > > ^admin\.[^\.]+\.(?=(com|net|org))$ > > > > You can capture the entire hostname by including grouping operators > > around the entire regex: > > > > ^(admin\.[^\.]+\.(com|net|org))$ > > > > ~Paul > > Sorry for the email to self here. The second regex was a bad copy/paste > and > should have been: > > ^(admin\.[^\.]+\.(?=(com|net|org)))$ > > ~Paul > > ________________________________ > > 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. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruben at varnish-software.com Mon Jul 9 19:55:36 2012 From: ruben at varnish-software.com (=?UTF-8?Q?Rub=C3=A9n_Romero?=) Date: Mon, 9 Jul 2012 21:55:36 +0200 Subject: Welcome to VUG6 in London, United Kingdom - October 5th & 6th, 2012 Message-ID: Hello everyone, It is my pleasure to announce the Sixth Varnish User Group meeting which will be held in London on the first week of October. The meeting is kindly sponsored by the BBC. The Varnish User Day will be on Friday 5th at the BBC Media Center. The location for the Varnish Developer meeting on Saturday (Hackurday?) will be announced later. Limited seats, so if you think you are coming, register now! Details & registration are available on our community website: < http://www.varnish.org/vug6> We urge all attendees to consider presenting to the audience how you use Varnish, as well as what kind of workshops or BoFs you would be interested in having. Add your presentation by replying to this email or directly in the wiki: For those of you going to the Velocity Europe Conference, VUG6 is the excuse you were looking for to spend the weekend in London. See you there! ;-) Best regards, -- Rub?n Romero, Self-Appointed Varnish Cheerleader! Phone: +47 21 98 92 62 / Mobile: +47 959 64 088 / Skype&Twitter: ruben_varnish *Varnish makes websites fly!* Whitepapers | Video | Twitter | LinkedIn -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Mon Jul 9 20:05:26 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Mon, 9 Jul 2012 13:05:26 -0700 Subject: How to match domains starting with "admin" In-Reply-To: <20120709194927.GE1884@nat.myhome> References: <20120709194736.GD1884@nat.myhome> <20120709194927.GE1884@nat.myhome> Message-ID: I have three domains with several subdomains, so I want to have them just in one regexp abc.domain1.com def.domain2.com ghi.domain2.com jkl.domain1.com mno.domain3.net Is this rule ok? if (req.http.Host ~ "^(.*?\.(domain1|domain2|domain3)\.(com|net))$") { set req.backend = domain1_domain2; } 2012/7/9 Paul A. Procacci > On Mon, Jul 09, 2012 at 02:47:36PM -0500, Paul A. Procacci wrote: > > On Mon, Jul 09, 2012 at 09:57:38AM -0700, Abraham Cruz Sustaita wrote: > > > I have several sites on my servers, so I need to configure one admin > > > subdomain for each one. However, I don't want to make: > > > > > > if (req.http.Host ~ > > > "(?i)([1]admin.domain1.com|[2]admin.domain2.com|[3] > admin.domainN.com)?$ > > > ") {} > > > > > > Can I do this only with one regular expression of the type > > > (admin\.(.*)) ? > > > > > > > Something like the following will match anything prefix'd with `admin`. > > You'd have to include the suffixes manually. Luckily, there aren't too > many > > tld's for this to be a major concern. > > > > ^admin\.[^\.]+\.(?=(com|net|org))$ > > > > You can capture the entire hostname by including grouping operators > > around the entire regex: > > > > ^(admin\.[^\.]+\.(com|net|org))$ > > > > ~Paul > > Sorry for the email to self here. The second regex was a bad copy/paste > and > should have been: > > ^(admin\.[^\.]+\.(?=(com|net|org)))$ > > ~Paul > > ________________________________ > > 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. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Mon Jul 9 20:09:13 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Mon, 9 Jul 2012 13:09:13 -0700 Subject: How to match domains starting with "admin" In-Reply-To: References: <20120709194736.GD1884@nat.myhome> <20120709194927.GE1884@nat.myhome> Message-ID: I forgot to mention I have domains like this: ar.subsubsubdomain.subsubdomain.subdomain.domain.com 2012/7/9 Abraham Cruz Sustaita > I have three domains with several subdomains, so I want to have them just > in one regexp > > abc.domain1.com > def.domain2.com > ghi.domain2.com > jkl.domain1.com > mno.domain3.net > > Is this rule ok? > > if (req.http.Host ~ "^(.*?\.(domain1|domain2|domain3)\.(com|net))$") { > set req.backend = domain1_domain2; > } > > 2012/7/9 Paul A. Procacci > >> On Mon, Jul 09, 2012 at 02:47:36PM -0500, Paul A. Procacci wrote: >> >> > On Mon, Jul 09, 2012 at 09:57:38AM -0700, Abraham Cruz Sustaita wrote: >> > > I have several sites on my servers, so I need to configure one >> admin >> > > subdomain for each one. However, I don't want to make: >> > > >> > > if (req.http.Host ~ >> > > "(?i)([1]admin.domain1.com|[2]admin.domain2.com|[3] >> admin.domainN.com)?$ >> > > ") {} >> > > >> > > Can I do this only with one regular expression of the type >> > > (admin\.(.*)) ? >> > > >> > >> > Something like the following will match anything prefix'd with `admin`. >> > You'd have to include the suffixes manually. Luckily, there aren't too >> many >> > tld's for this to be a major concern. >> > >> > ^admin\.[^\.]+\.(?=(com|net|org))$ >> > >> > You can capture the entire hostname by including grouping operators >> > around the entire regex: >> > >> > ^(admin\.[^\.]+\.(com|net|org))$ >> > >> > ~Paul >> >> Sorry for the email to self here. The second regex was a bad copy/paste >> and >> should have been: >> >> ^(admin\.[^\.]+\.(?=(com|net|org)))$ >> >> ~Paul >> >> ________________________________ >> >> 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. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.fernandezcrisial at gmail.com Mon Jul 9 20:09:21 2012 From: roberto.fernandezcrisial at gmail.com (roberto.fernandezcrisial at gmail.com) Date: Mon, 9 Jul 2012 20:09:21 +0000 Subject: How to match domains starting with "admin" In-Reply-To: References: <20120709194736.GD1884@nat.myhome> <20120709194927.GE1884@nat.myhome> Message-ID: <1208817726-1341864573-cardhu_decombobulator_blackberry.rim.net-1649295994-@b26.c27.bise6.blackberry> It's correct, at least the idea you have un mind. Best, @rofc Enviado desde mi BlackBerry de Movistar (http://www.movistar.com.ar) -----Original Message----- From: Abraham Cruz Sustaita Sender: varnish-misc-bounces at varnish-cache.org Date: Mon, 9 Jul 2012 13:05:26 To: Paul A. Procacci Cc: Subject: Re: How to match domains starting with "admin" _______________________________________________ varnish-misc mailing list varnish-misc at varnish-cache.org https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From javier at casares.org Mon Jul 9 20:09:15 2012 From: javier at casares.org (Javier Casares) Date: Mon, 9 Jul 2012 22:09:15 +0200 Subject: How to match domains starting with "admin" In-Reply-To: References: <20120709194736.GD1884@nat.myhome> <20120709194927.GE1884@nat.myhome> Message-ID: Is not easy... if (req.http.host ~ "domain1" || req.http.host ~ "domain2") { set req.backend = domain1_domain2; } or something like this? I use this and works fine to me. Javier Casares http://javiercasares.com/ 2012/7/9 Abraham Cruz Sustaita : > I have three domains with several subdomains, so I want to have them just in > one regexp > > abc.domain1.com > def.domain2.com > ghi.domain2.com > jkl.domain1.com > mno.domain3.net > > Is this rule ok? > > if (req.http.Host ~ "^(.*?\.(domain1|domain2|domain3)\.(com|net))$") { > set req.backend = domain1_domain2; > } > > 2012/7/9 Paul A. Procacci >> >> On Mon, Jul 09, 2012 at 02:47:36PM -0500, Paul A. Procacci wrote: >> >> > On Mon, Jul 09, 2012 at 09:57:38AM -0700, Abraham Cruz Sustaita wrote: >> > > I have several sites on my servers, so I need to configure one >> > > admin >> > > subdomain for each one. However, I don't want to make: >> > > >> > > if (req.http.Host ~ >> > > >> > > "(?i)([1]admin.domain1.com|[2]admin.domain2.com|[3]admin.domainN.com)?$ >> > > ") {} >> > > >> > > Can I do this only with one regular expression of the type >> > > (admin\.(.*)) ? >> > > >> > >> > Something like the following will match anything prefix'd with `admin`. >> > You'd have to include the suffixes manually. Luckily, there aren't too >> > many >> > tld's for this to be a major concern. >> > >> > ^admin\.[^\.]+\.(?=(com|net|org))$ >> > >> > You can capture the entire hostname by including grouping operators >> > around the entire regex: >> > >> > ^(admin\.[^\.]+\.(com|net|org))$ >> > >> > ~Paul >> >> Sorry for the email to self here. The second regex was a bad copy/paste >> and >> should have been: >> >> ^(admin\.[^\.]+\.(?=(com|net|org)))$ >> >> ~Paul >> >> ________________________________ >> >> 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 From pprocacci at datapipe.com Mon Jul 9 20:20:01 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Mon, 9 Jul 2012 15:20:01 -0500 Subject: How to match domains starting with "admin" In-Reply-To: References: <20120709194736.GD1884@nat.myhome> <20120709194927.GE1884@nat.myhome> Message-ID: <20120709202001.GF1884@nat.myhome> On Mon, Jul 09, 2012 at 10:09:15PM +0200, Javier Casares wrote: > Is not easy... > > if (req.http.host ~ "domain1" || req.http.host ~ "domain2") { > set req.backend = domain1_domain2; > } > > or something like this? I use this and works fine to me. > This is close. Though, if your prefixes, and TLD are different, as well as the domain name, I'd personally use an exact match operator and not a regex operator: if(req.http.host = "domain1" || req.http.host = "domain2") { set req.backend = domain1_domain2; } ________________________________ 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 sengelha at gmail.com Mon Jul 9 20:54:55 2012 From: sengelha at gmail.com (Steven Engelhardt) Date: Mon, 9 Jul 2012 15:54:55 -0500 Subject: Zero-Downtime Servicing of a Varnish Server Behind a F5 BIG-IP Message-ID: I have two Varnish servers behind a F5 BIG-IP load balancer. Both servers are constantly active and serving ~5,000 requests/second 24x7. Clients aggressively use HTTP 1.1 Keep-Alives. I'm looking to develop a process for servicing and upgrading the Varnish servers which results in 0 downtime to the client. Our normal process for performing changes on production servers is: 1. Mark the server as disabled in the BIG-IP 2. Wait for the connections on the server to drop to 0 3. Service the machine However, because of the aggressive and constant use of HTTP Keep-Alives, clients virtually never drop their connections, and the machine continues to serve traffic for quite a long time after it is disabled in the BIG-IP. Is there a way to tell Varnish to aggressively close all client HTTP connections? Thank you, Steve -- Steven Engelhardt sengelha at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From javier at casares.org Mon Jul 9 20:59:43 2012 From: javier at casares.org (Javier Casares) Date: Mon, 9 Jul 2012 22:59:43 +0200 Subject: Zero-Downtime Servicing of a Varnish Server Behind a F5 BIG-IP In-Reply-To: References: Message-ID: https://www.varnish-cache.org/docs/3.0/reference/varnishd.html sess_timeout Units: seconds Default: 5 Idle timeout for persistent sessions. If a HTTP request has not been received in this many seconds, the session is closed. ?? Javier Casares http://javiercasares.com/ 2012/7/9 Steven Engelhardt : > I have two Varnish servers behind a F5 BIG-IP load balancer. Both servers > are constantly active and serving ~5,000 requests/second 24x7. Clients > aggressively use HTTP 1.1 Keep-Alives. > > I'm looking to develop a process for servicing and upgrading the Varnish > servers which results in 0 downtime to the client. Our normal process for > performing changes on production servers is: > 1. Mark the server as disabled in the BIG-IP > 2. Wait for the connections on the server to drop to 0 > 3. Service the machine > > However, because of the aggressive and constant use of HTTP Keep-Alives, > clients virtually never drop their connections, and the machine continues to > serve traffic for quite a long time after it is disabled in the BIG-IP. > > Is there a way to tell Varnish to aggressively close all client HTTP > connections? > > Thank you, > Steve > > -- > Steven Engelhardt > sengelha at gmail.com > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From sengelha at gmail.com Mon Jul 9 21:03:27 2012 From: sengelha at gmail.com (Steven Engelhardt) Date: Mon, 9 Jul 2012 16:03:27 -0500 Subject: Zero-Downtime Servicing of a Varnish Server Behind a F5 BIG-IP In-Reply-To: References: Message-ID: Just to be clear, would you suggest something like: 1. Mark the Varnish server as disabled in the BIG-IP 2. Use varnishadm to set sess_timeout to 0 to start aggressively closing HTTP requests? 3. Wait for connections to drain Steve On Mon, Jul 9, 2012 at 3:59 PM, Javier Casares wrote: > https://www.varnish-cache.org/docs/3.0/reference/varnishd.html > > sess_timeout > > Units: seconds > Default: 5 > > Idle timeout for persistent sessions. If a HTTP request has not > been received in this many seconds, the session is closed. > > ?? > > Javier Casares > http://javiercasares.com/ > > > 2012/7/9 Steven Engelhardt : > > I have two Varnish servers behind a F5 BIG-IP load balancer. Both > servers > > are constantly active and serving ~5,000 requests/second 24x7. Clients > > aggressively use HTTP 1.1 Keep-Alives. > > > > I'm looking to develop a process for servicing and upgrading the Varnish > > servers which results in 0 downtime to the client. Our normal process > for > > performing changes on production servers is: > > 1. Mark the server as disabled in the BIG-IP > > 2. Wait for the connections on the server to drop to 0 > > 3. Service the machine > > > > However, because of the aggressive and constant use of HTTP Keep-Alives, > > clients virtually never drop their connections, and the machine > continues to > > serve traffic for quite a long time after it is disabled in the BIG-IP. > > > > Is there a way to tell Varnish to aggressively close all client HTTP > > connections? > > > > Thank you, > > Steve > > > > -- > > Steven Engelhardt > > sengelha at gmail.com > > > > _______________________________________________ > > 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 -- Steven Engelhardt sengelha at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From javier at casares.org Mon Jul 9 21:07:08 2012 From: javier at casares.org (Javier Casares) Date: Mon, 9 Jul 2012 23:07:08 +0200 Subject: Zero-Downtime Servicing of a Varnish Server Behind a F5 BIG-IP In-Reply-To: References: Message-ID: If sess_timeout is set by default to 5 seconds, you could try to set this to 4, 3, 2 or 1 and test if has a better performance... i suposse that set this to 0 will close all connectiond and seems to be an epic fail... Javier Casares http://javiercasares.com/ 2012/7/9 Steven Engelhardt : > Just to be clear, would you suggest something like: > 1. Mark the Varnish server as disabled in the BIG-IP > 2. Use varnishadm to set sess_timeout to 0 to start aggressively closing > HTTP requests? > 3. Wait for connections to drain > > Steve > > On Mon, Jul 9, 2012 at 3:59 PM, Javier Casares wrote: >> >> https://www.varnish-cache.org/docs/3.0/reference/varnishd.html >> >> sess_timeout >> >> Units: seconds >> Default: 5 >> >> Idle timeout for persistent sessions. If a HTTP request has not >> been received in this many seconds, the session is closed. >> >> ?? >> >> Javier Casares >> http://javiercasares.com/ >> >> >> 2012/7/9 Steven Engelhardt : >> > I have two Varnish servers behind a F5 BIG-IP load balancer. Both >> > servers >> > are constantly active and serving ~5,000 requests/second 24x7. Clients >> > aggressively use HTTP 1.1 Keep-Alives. >> > >> > I'm looking to develop a process for servicing and upgrading the Varnish >> > servers which results in 0 downtime to the client. Our normal process >> > for >> > performing changes on production servers is: >> > 1. Mark the server as disabled in the BIG-IP >> > 2. Wait for the connections on the server to drop to 0 >> > 3. Service the machine >> > >> > However, because of the aggressive and constant use of HTTP Keep-Alives, >> > clients virtually never drop their connections, and the machine >> > continues to >> > serve traffic for quite a long time after it is disabled in the BIG-IP. >> > >> > Is there a way to tell Varnish to aggressively close all client HTTP >> > connections? >> > >> > Thank you, >> > Steve >> > >> > -- >> > Steven Engelhardt >> > sengelha at gmail.com >> > >> > _______________________________________________ >> > 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 > > > > > -- > Steven Engelhardt > sengelha at gmail.com > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From sengelha at gmail.com Mon Jul 9 21:24:18 2012 From: sengelha at gmail.com (Steven Engelhardt) Date: Mon, 9 Jul 2012 16:24:18 -0500 Subject: Zero-Downtime Servicing of a Varnish Server Behind a F5 BIG-IP In-Reply-To: References: Message-ID: Because of the usage patterns of the web service, I'm not sure that even a 1-second timeout would be sufficient to get all HTTP client connections to close. The idea of setting sess_timeout to be 0 was strictly in the context of taking a Varnish server out of service, in order to (somewhat indirectly) force the out of service Varnish server to close all its HTTP connections. We would restore sess_timeout to a sensible value before putting it back in service. Steve On Mon, Jul 9, 2012 at 4:07 PM, Javier Casares wrote: > If sess_timeout is set by default to 5 seconds, you could try to set > this to 4, 3, 2 or 1 and test if has a better performance... i suposse > that set this to 0 will close all connectiond and seems to be an epic > fail... > > Javier Casares > http://javiercasares.com/ > > > 2012/7/9 Steven Engelhardt : > > Just to be clear, would you suggest something like: > > 1. Mark the Varnish server as disabled in the BIG-IP > > 2. Use varnishadm to set sess_timeout to 0 to start aggressively closing > > HTTP requests? > > 3. Wait for connections to drain > > > > Steve > > > > On Mon, Jul 9, 2012 at 3:59 PM, Javier Casares > wrote: > >> > >> https://www.varnish-cache.org/docs/3.0/reference/varnishd.html > >> > >> sess_timeout > >> > >> Units: seconds > >> Default: 5 > >> > >> Idle timeout for persistent sessions. If a HTTP request has not > >> been received in this many seconds, the session is closed. > >> > >> ?? > >> > >> Javier Casares > >> http://javiercasares.com/ > >> > >> > >> 2012/7/9 Steven Engelhardt : > >> > I have two Varnish servers behind a F5 BIG-IP load balancer. Both > >> > servers > >> > are constantly active and serving ~5,000 requests/second 24x7. > Clients > >> > aggressively use HTTP 1.1 Keep-Alives. > >> > > >> > I'm looking to develop a process for servicing and upgrading the > Varnish > >> > servers which results in 0 downtime to the client. Our normal process > >> > for > >> > performing changes on production servers is: > >> > 1. Mark the server as disabled in the BIG-IP > >> > 2. Wait for the connections on the server to drop to 0 > >> > 3. Service the machine > >> > > >> > However, because of the aggressive and constant use of HTTP > Keep-Alives, > >> > clients virtually never drop their connections, and the machine > >> > continues to > >> > serve traffic for quite a long time after it is disabled in the > BIG-IP. > >> > > >> > Is there a way to tell Varnish to aggressively close all client HTTP > >> > connections? > >> > > >> > Thank you, > >> > Steve > >> > > >> > -- > >> > Steven Engelhardt > >> > sengelha at gmail.com > >> > > >> > _______________________________________________ > >> > 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 > > > > > > > > > > -- > > Steven Engelhardt > > sengelha at gmail.com > > > > _______________________________________________ > > 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 > -- Steven Engelhardt sengelha at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.tailor at gmail.com Mon Jul 9 21:59:10 2012 From: nick.tailor at gmail.com (nick tailor) Date: Mon, 9 Jul 2012 14:59:10 -0700 Subject: Varnish Grace Question? In-Reply-To: References: Message-ID: Nevermind I got it working. In case anyone else runs into this. You need have the following also setup in your grace configuration if you went varnish to server stale content when backends are down. Set this to like 6 hours, if this not set it defaults to 1 min and objects are removed from the cache after 1 min and everything goes bye bye. set beresp.ttl=1m; Cheers Nick Tailor On Mon, Jul 9, 2012 at 12:37 PM, nick tailor wrote: > Hello, > > So, I used this link > http://www.lullabot.com/articles/varnish-multiple-web-servers-drupal to > setup my varnish stuff. > > Made some minor adjustments to the probes, however if I stop stop one of > my webservers to see if the content my varnish serves is from the cache, it > just shows a page service unavailble, and from what I've read you need to > have the grace mode stuff in there, which this default vcl for version 3 > does. > > Anyone, have any ideas why my Drupal sites are not serving cached? when my > backend are down. > > ===================================================== > # Respond to incoming requests. > sub vcl_recv { > # Allow the backend to serve up stale content if it is responding slowly. > set req.grace = 6h; > } > > # Code determining what to do when serving items from the Apache servers. > sub vcl_fetch { > # Allow items to be stale if needed. > set beresp.grace = 6h; > } > ===================================================== > > Cheers > > Nick Tailor > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apj at mutt.dk Tue Jul 10 08:49:04 2012 From: apj at mutt.dk (Andreas Plesner Jacobsen) Date: Tue, 10 Jul 2012 10:49:04 +0200 Subject: Varnish Grace Question? In-Reply-To: References: Message-ID: <20120710084904.GJ12685@nerd.dk> On Mon, Jul 09, 2012 at 02:59:10PM -0700, nick tailor wrote: > Nevermind I got it working. In case anyone else runs into this. > > You need have the following also setup in your grace configuration if you > went varnish to server stale content when backends are down. Set this to > like 6 hours, if this not set it defaults to 1 min and objects are removed > from the cache after 1 min and everything goes bye bye. > > set beresp.ttl=1m; That is not correct. The content will be removed only after ttl and grace expires. The most likely case is that you didn't cache at all because ttl was negative, until you made this change. The default default_ttl is 2 minutes, not one. -- Andreas From hugo.cisneiros at gmail.com Tue Jul 10 17:24:23 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Tue, 10 Jul 2012 14:24:23 -0300 Subject: virtual hosts setup In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 12:14 AM, austin wonderly wrote: > would it be recommended to upgrade to 3.x? Yes, it is recommended to upgrade to 3.x as it is the current stable release with many nice features :) Also, if you have problems with VCL compiling, next time you should post them to the mailing list and we'll try to help. Most times, the problems are always on syntax errors. -- []'s Hugo www.devin.com.br From hugo.cisneiros at gmail.com Tue Jul 10 17:34:16 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Tue, 10 Jul 2012 14:34:16 -0300 Subject: Using ESI-tags inside a cached object In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 11:51 AM, Kasper Grubbe wrote: > I am following the guide here: > https://www.varnish-cache.org/docs/trunk/tutorial/esi.html > > I have two pages in my project as of now: > > 1. http://127.0.0.1:3001/ (Cache-Control:max-age=60, private): > Cached: <%= Time.now %>
> ESI:
> > 2. http://127.0.0.1:3001/staticview (Cache-Control:max-age=1, private): > <%= Time.now %> > > However, every time I request the first page, it seems like it also > caches the ESI-include result for the 60 seconds instead of refreshing > every second. I think it is expected, as you're caching the ESI page too. When varnish finds an ESI tag, it gets the page as a internal new request. So you must do a pass on the /staticview, and it will be always dynamic. -- []'s Hugo www.devin.com.br From nick.tailor at gmail.com Tue Jul 10 18:22:24 2012 From: nick.tailor at gmail.com (nick tailor) Date: Tue, 10 Jul 2012 11:22:24 -0700 Subject: Question? Message-ID: Does anyone know? Does Varnish allow you to load multiple VCL files or is it you only use the default.vcl ? Cheers Nick Tailor -------------- next part -------------- An HTML attachment was scrubbed... URL: From drtaber at northcarolina.edu Tue Jul 10 18:44:14 2012 From: drtaber at northcarolina.edu (Douglas R Taber) Date: Tue, 10 Jul 2012 18:44:14 +0000 Subject: Question? In-Reply-To: References: Message-ID: <0E436376-BFDB-44C6-B880-72867D7192A9@northcarolina.edu> On Jul 10, 2012, at 2:22 PM, nick tailor wrote: > Does anyone know? Does Varnish allow you to load multiple VCL files or is it you only use the default.vcl ? > > Cheers > > Nick Tailor > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc You can include other VCL files via: include "/path/to/file.vcl"; in your default.vcl From nick.tailor at gmail.com Tue Jul 10 19:22:17 2012 From: nick.tailor at gmail.com (nick tailor) Date: Tue, 10 Jul 2012 12:22:17 -0700 Subject: Cache updating not working for me Message-ID: Sweet. One more question. Currently. I'm testing my varnish environment, everything seems to be working fine except one thing. I would like my cache to update every 30 seconds if the backend is healthy and serve stale content if the backend goes down. The content is served perfectly when the backend is down, however the cache is not updating every 30 seconds if the backend is healthy. Could someone have a look at my config below and tell me what I'm missing? Please and thank you ===================================== # Define the internal network subnet. # These are used below to allow internal access to certain files while not # allowing access from the public internet. acl internal { "192.10.0.0"/24; } # Define the list of backends (web servers). # Port 80 Backend Servers backend web1 { .host = "testing.com"; .probe = { .url = "/"; .interval = 5s; .timeout = 1s; .window = 5;.threshold = 3; }} backend web2 { .host = "testing.com"; .probe = { .url = "/"; .interval = 5s; .timeout = 1s; .window = 5;.threshold = 3; }} # Port 443 Backend Servers for SSL backend web1_ssl { .host = "testing.com"; .port = "443"; .probe = { .url = "/"; .interval = 5s; .timeout = 5s; .window = 5;.threshold = 3; }} backend web2_ssl { .host = "testing.com"; .port = "443"; .probe = { .url = "/"; .interval = 5s; .timeout = 5s; .window = 5;.threshold = 3; }} # Define the director that determines how to distribute incoming requests. director default_director round-robin { { .backend = web1; } { .backend = web2; } } director ssl_director round-robin { { .backend = web1_ssl; } { .backend = web2_ssl; } } # Respond to incoming requests. sub vcl_recv { # Allow the backend to serve up stale content if it is responding slowly. if (req.backend.healthy) { set req.grace = 30s; } else { set req.grace = 5h; } } # Code determining what to do when serving items from the Apache servers. sub vcl_fetch { # Allow items to be stale if needed. set beresp.grace = 6h; set beresp.ttl = 12h; } # Respond to incoming requests. sub vcl_recv { # Set the director to cycle between web servers. if (server.port == 443) { set req.backend = ssl_director; } else { set req.backend = default_director; } # Use anonymous, cached pages if all backends are down. if (!req.backend.healthy) { unset req.http.Cookie; } # Allow the backend to serve up stale content if it is responding slowly. set req.grace = 6h; # Do not cache these paths. if (req.url ~ "^/status\.php$" || req.url ~ "^/update\.php$" || req.url ~ "^/ooyala/ping$" || req.url ~ "^/admin/build/features" || req.url ~ "^/info/.*$" || req.url ~ "^/flag/.*$" || req.url ~ "^.*/ajax/.*$" || req.url ~ "^.*/ahah/.*$") { return (pass); } # Pipe these paths directly to Apache for streaming. if (req.url ~ "^/admin/content/backup_migrate/export") { return (pipe); } # Do not allow outside access to cron.php or install.php. if (req.url ~ "^/(cron|install)\.php$" && !client.ip ~ internal) { # Have Varnish throw the error directly. error 404 "Page not found."; # Use a custom error page that you've defined in Drupal at the path "404". # set req.url = "/404"; } # Handle compression correctly. Different browsers send different # "Accept-Encoding" headers, even though they mostly all support the same # compression mechanisms. By consolidating these compression headers into # a consistent format, we can reduce the size of the cache and get more hits.= # @see: http:// varnish.projects.linpro.no/wiki/FAQ/Compression if (req.http.Accept-Encoding) { if (req.http.Accept-Encoding ~ "gzip") { # If the browser supports it, we'll use gzip. set req.http.Accept-Encoding = "gzip"; } else if (req.http.Accept-Encoding ~ "deflate") { # Next, try deflate if it is supported. set req.http.Accept-Encoding = "deflate"; } else { # Unknown algorithm. Remove it and send unencoded. unset req.http.Accept-Encoding; } } # Always cache the following file types for all users. if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|css|js|html|htm)(\?[a-z0-9]+)?$") { unset req.http.Cookie; } # Remove all cookies that Drupal doesn't need to know about. ANY remaining # cookie will cause the request to pass-through to Apache. For the most part # we always set the NO_CACHE cookie after any POST request, disabling the # Varnish cache temporarily. The session cookie allows all authenticated users # to pass through as long as they're logged in. 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, ";(SESS[a-z0-9]+|NO_CACHE)=", "; \1="); set req.http.Cookie = regsuball(req.http.Cookie, ";[^ ][^;]*", ""); set req.http.Cookie = regsuball(req.http.Cookie, "^[; ]+|[; ]+$", ""); if (req.http.Cookie == "") { # If there are no remaining cookies, remove the cookie header. If there # aren't any cookie headers, Varnish's default behavior will be to cache # the page. unset req.http.Cookie; } else { # If there is any cookies left (a session or NO_CACHE cookie), do not # cache the page. Pass it on to Apache directly. return (pass); } } } # Routine used to determine the cache key if storing/retrieving a cached page. sub vcl_hash { # Include cookie in cache hash. # This check is unnecessary because we already pass on all cookies. # if (req.http.Cookie) { # set req.hash += req.http.Cookie; # } } # Code determining what to do when serving items from the Apache servers. sub vcl_fetch { # Don't allow static files to set cookies. if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|css|js|html|htm)(\?[a-z0-9]+)?$") { # beresp == Back-end response from the web server. unset beresp.http.set-cookie; } # Allow items to be stale if needed. set beresp.grace = 6h; } # In the event of an error, show friendlier messages. sub vcl_error { # Redirect to some other URL in the case of a homepage failure. #if (req.url ~ "^/?$") { # set obj.status = 302; # set obj.http.Location = "http://backup.example.com/"; #} # Otherwise redirect to the homepage, which will likely be in the cache. set obj.http.Content-Type = "text/html; charset=utf-8"; synthetic {" Page Unavailable

Page Unavailable

The page you requested is temporarily unavailable.

We're redirecting you to the homepage in 5 seconds.

(Error "} + obj.status + " " + obj.response + {")
"}; return (deliver); } =================================== Cheers Nick Tailor -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.tailor at gmail.com Thu Jul 12 18:37:19 2012 From: nick.tailor at gmail.com (nick tailor) Date: Thu, 12 Jul 2012 11:37:19 -0700 Subject: How to force build the cache Message-ID: Is there a way to force build the cache for sites? other than using wget, which isnt the best way. Reason why is I am testing my cache when the backend goes down. I would like to ensure that all pages that need to cached are there, if the page has not been visited before then it wouldnt get cached. Is there a script or someone know a good way to achieve this? Cheers Nick Tailor -------------- next part -------------- An HTML attachment was scrubbed... URL: From hugo.cisneiros at gmail.com Thu Jul 12 18:45:19 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Thu, 12 Jul 2012 15:45:19 -0300 Subject: How to force build the cache In-Reply-To: References: Message-ID: On Thu, Jul 12, 2012 at 3:37 PM, nick tailor wrote: > Is there a way to force build the cache for sites? other than using wget, > which isnt the best way. Reason why is I am testing my cache when the > backend goes down. > I would like to ensure that all pages that need to cached are there, if the > page has not been visited before then it wouldnt get cached. > > Is there a script or someone know a good way to achieve this? You must use some sort of http fetch for warming the cache, it's the only way varnish really knows how to fetch the desired pages and generate internal cache. A good utility to do this could be the varnishreplay(1) command. Take a look at it. -- []'s Hugo www.devin.com.br From lists at hub.org Fri Jul 13 17:51:02 2012 From: lists at hub.org (Marc Fournier) Date: Fri, 13 Jul 2012 13:51:02 -0400 Subject: Varnish 3.0.2 on FreeBSD 8-STABLE: Constant Restart Message-ID: <1636C4FA-FE82-4964-9DBA-3F180B19B057@hub.org> Morning ? OS: FreeBSD 8.3-STABLE #2: Mon Jul 2 21:20:02 UTC 2012 I am trying to use varnish as a caching front end to a wordpress site ? found some wordpress specific templetes for vcl_recv / vcl_fetch, to provide me with a base, and everything starts up, and stays running fine, *until* I change my DNS to have the domain go through Varnish ? and then it starts rebooting ? This test through, before I switched DNS, I had an uptime (according to varnish stat) of just over 1 hr ? as soon as I switched DNS over, uptime kept resetting to 0, with (after switching DNS back again), I'm currently seeing: 0+00:07:44 Hitrate ratio: 0 0 0 Hitrate avg: 0.0000 0.0000 0.0000 And, according to ps, you can see the Child much younger then the Mgr: root at lb1:/var/log # ps aux | grep varnish www 52281 0.0 0.0 355674084 6432 ?? IJ 5:34PM 0:00.16 varnishd: Varnish-Chld lb1.hospitalityleaders.com (varnishd) root 74714 0.0 0.0 98032 2636 ?? SsJ 4:21PM 0:00.13 varnishd: Varnish-Mgr lb1.hospitalityleaders.com (varnishd) root 71856 0.0 0.0 540 328 2 S+J 5:44PM 0:00.00 grep varnish I'm new with this, so not really sure how best to debug ? I did see something from PHK in one of my searches talking about an issue with cookies ? ? But I haven't been able to re-find that posting ? I've also, so far, been unable to find a core file, although I'm currently running a find across the whole file system to see if there isn't one ? Any suggestions on where to start debugging this, or more information I can provide, would be appreciated ? Thank you ... From contact at jpluscplusm.com Sun Jul 15 20:57:31 2012 From: contact at jpluscplusm.com (Jonathan Matthews) Date: Sun, 15 Jul 2012 21:57:31 +0100 Subject: How to include inside vcl_recv In-Reply-To: References: Message-ID: On 9 July 2012 17:38, Abraham Cruz Sustaita wrote: > How should I include a file inside vcl_recv? I think the reason you've had no replies to this mail is because the answer is eminently discoverable via your favourite search engine. Try "varnish cache include syntax". Jonathan -- Jonathan Matthews Oxford, London, UK http://www.jpluscplusm.com/contact.html From nick.tailor at gmail.com Mon Jul 16 06:23:51 2012 From: nick.tailor at gmail.com (Nick Tailor) Date: Sun, 15 Jul 2012 23:23:51 -0700 Subject: How to include inside vcl_recv In-Reply-To: References: Message-ID: <9257C7B1-C498-4380-B89F-43695E876444@gmail.com> Sheesh, just tell him. It's like any other php, apache, etc Include "file path"; Sent from my iPhone On Jul 15, 2012, at 1:57 PM, Jonathan Matthews wrote: > On 9 July 2012 17:38, Abraham Cruz Sustaita > wrote: >> How should I include a file inside vcl_recv? > > I think the reason you've had no replies to this mail is because the > answer is eminently discoverable via your favourite search engine. > Try "varnish cache include syntax". > > Jonathan > -- > Jonathan Matthews > Oxford, London, UK > http://www.jpluscplusm.com/contact.html > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From javier at casares.org Mon Jul 16 09:30:05 2012 From: javier at casares.org (Javier Casares) Date: Mon, 16 Jul 2012 11:30:05 +0200 Subject: Persistent file size limit Message-ID: Hi! Some days ago i've configured part of the cache into persistent files... some of them in large files (from 20G to 150G) but, since this day when these files arrives to 8G-9G Varnish starts to work... rare. Now i'm putting some files with max 5G and it seems to work fine... do you know if persistent cache fails when files arrives to 8GB or something? Thanks! Javier Casares http://javiercasares.com/ From javier at casares.org Mon Jul 16 09:50:17 2012 From: javier at casares.org (Javier Casares) Date: Mon, 16 Jul 2012 11:50:17 +0200 Subject: Varnish 3.0.3 RC1 problem Message-ID: I've some problems like this (Assert error in http_Write(), cache_http.c line 1082) Jul 16 10:55:45 249206 varnishd[15839]: Child (15840) Panic message: Assert error in http_Write(), cache_http.c line 1082:#012 Condition((hp->hd[HTTP_HDR_STATUS].b) != 0) not true.#012thread = (cache-worker)#012ident = Linux,2.6.32-042stab055.10,x86_64,-spersistent,-spersistent,-spersistent,-spersistent,-spersistent,-spersistent,-spersistent,-spersistent,-spersistent,-spersistent,-spersistent,-spersistent,-smalloc,-hcritbit,epoll#012Backtrace:#012 0x42d596: /usr/sbin/varnishd() [0x42d596]#012 0x4283f3: /usr/sbin/varnishd(http_Write+0x293) [0x4283f3]#012 0x43070d: /usr/sbin/varnishd(RES_WriteObj+0x33d) [0x43070d]#012 0x41624b: /usr/sbin/varnishd() [0x41624b]#012 0x418337: /usr/sbin/varnishd(CNT_Session+0x7a7) [0x418337]#012 0x42f006: /usr/sbin/varnishd() [0x42f006]#012 0x7f78b50967f1: /lib64/libpthread.so.0(+0x77f1) [0x7f78b50967f1]#012 0x7f78b4de4ccd: /lib64/libc.so.6(clone+0x6d) [0x7f78b4de4ccd]#012sp = 0x7f6990383008 {#012 fd = 73, id = 73, xid = 1407680162,#012 client = 87.222.4.173 38253,#012 step = STP_DELIVER,#012 handling = deliver,#012 err_code = 200, err_reason = (null),#012 restarts = 0, esi_level = 0#012 flags = is_gunzip#012 bodystatus = 4#012 ws = 0x7f6990383080 { #012 id = "sess",#012 {s,f,r,e} = {0x7f6990383c78,+912,(nil),+65536},#012 },#012 http[req] = {#012 ws = 0x7f6990383080[sess]#012 "GET",#012 "XXXXXXXX.jpg",#012 "HTTP/1.1",#012 "Host: XXXXXXXX.com",#012 "Connection: keep-alive",#012 "Referer: http://XXXXXXXX.com/",#012 "Accept-Language: es-ES, en-US",#012 "x-wap-profile: http://wap.samsungmobile.com/uaprof/GT-S5570.xml",#012 "Accept: text/xml, text/html, application/xhtml+xml, image/png, text/plain, */*;q=0.8",#012 "Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7",#012 "X-Forwarded-For: 87.222.4.173",#012 "X-UA-Device: mobile-android",#012 },#012 worker = 0x7f69869efa70 {#012 ws = 0x7f69869efca8 { overflow#012 id = "wrk",#012 {s,f,r,e} = {0x7f Javier Casares http://javiercasares.com/ From contact at jpluscplusm.com Mon Jul 16 11:29:54 2012 From: contact at jpluscplusm.com (Jonathan Matthews) Date: Mon, 16 Jul 2012 12:29:54 +0100 Subject: How to include inside vcl_recv In-Reply-To: <9257C7B1-C498-4380-B89F-43695E876444@gmail.com> References: <9257C7B1-C498-4380-B89F-43695E876444@gmail.com> Message-ID: > On Jul 15, 2012, at 1:57 PM, Jonathan Matthews wrote: > >> On 9 July 2012 17:38, Abraham Cruz Sustaita >> wrote: >>> How should I include a file inside vcl_recv? >> >> I think the reason you've had no replies to this mail is because the >> answer is eminently discoverable via your favourite search engine. >> Try "varnish cache include syntax". On 16 July 2012 07:23, Nick Tailor wrote: > Sheesh, just tell him. Ok, but you fed him the first time - he's your responsibility when he comes back hungry for more trivially discoverable information ... ;-) J -- Jonathan Matthews Oxford, London, UK http://www.jpluscplusm.com/contact.html From nick.tailor at gmail.com Mon Jul 16 12:43:09 2012 From: nick.tailor at gmail.com (Nick Tailor) Date: Mon, 16 Jul 2012 05:43:09 -0700 Subject: How to include inside vcl_recv In-Reply-To: References: <9257C7B1-C498-4380-B89F-43695E876444@gmail.com> Message-ID: <1EBEF53A-0847-41C6-B0DE-D80E21E10FB2@gmail.com> Hahhahaha, google is not always your friend. It will give you like 10 different answers for things. Sometimes it's easier and time efficient to just tell them. Sent from my iPhone On Jul 16, 2012, at 4:29 AM, Jonathan Matthews wrote: >> On Jul 15, 2012, at 1:57 PM, Jonathan Matthews wrote: >> >>> On 9 July 2012 17:38, Abraham Cruz Sustaita >>> wrote: >>>> How should I include a file inside vcl_recv? >>> >>> I think the reason you've had no replies to this mail is because the >>> answer is eminently discoverable via your favourite search engine. >>> Try "varnish cache include syntax". > > On 16 July 2012 07:23, Nick Tailor wrote: >> Sheesh, just tell him. > > Ok, but you fed him the first time - he's your responsibility when he > comes back hungry for more trivially discoverable information ... ;-) > > J > > -- > Jonathan Matthews > Oxford, London, UK > http://www.jpluscplusm.com/contact.html > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From abraham.sustaita at buscacorp.com Mon Jul 16 16:13:54 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Mon, 16 Jul 2012 09:13:54 -0700 Subject: How to include inside vcl_recv In-Reply-To: <1EBEF53A-0847-41C6-B0DE-D80E21E10FB2@gmail.com> References: <9257C7B1-C498-4380-B89F-43695E876444@gmail.com> <1EBEF53A-0847-41C6-B0DE-D80E21E10FB2@gmail.com> Message-ID: Nick, thanks a lot, you were really helpfull. Jonathan, I don't need for anybody to "feed" me. I google it in the first place, but my research only show me how to include files outside the rules, if you read carefully my question you will see it. The question was how to do it from other file and inside the rule "sub vcl_recv". However thanks for your "answer", since because of that Nick told me the answer. 2012/7/16 Nick Tailor > Hahhahaha, google is not always your friend. It will give you like 10 > different answers for things. Sometimes it's easier and time efficient to > just tell them. > > Sent from my iPhone > > On Jul 16, 2012, at 4:29 AM, Jonathan Matthews > wrote: > > >> On Jul 15, 2012, at 1:57 PM, Jonathan Matthews > wrote: > >> > >>> On 9 July 2012 17:38, Abraham Cruz Sustaita > >>> wrote: > >>>> How should I include a file inside vcl_recv? > >>> > >>> I think the reason you've had no replies to this mail is because the > >>> answer is eminently discoverable via your favourite search engine. > >>> Try "varnish cache include syntax". > > > > On 16 July 2012 07:23, Nick Tailor wrote: > >> Sheesh, just tell him. > > > > Ok, but you fed him the first time - he's your responsibility when he > > comes back hungry for more trivially discoverable information ... ;-) > > > > J > > > > -- > > Jonathan Matthews > > Oxford, London, UK > > http://www.jpluscplusm.com/contact.html > > > > _______________________________________________ > > 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 contact at jpluscplusm.com Mon Jul 16 16:49:07 2012 From: contact at jpluscplusm.com (Jonathan Matthews) Date: Mon, 16 Jul 2012 17:49:07 +0100 Subject: How to include inside vcl_recv In-Reply-To: <1EBEF53A-0847-41C6-B0DE-D80E21E10FB2@gmail.com> References: <9257C7B1-C498-4380-B89F-43695E876444@gmail.com> <1EBEF53A-0847-41C6-B0DE-D80E21E10FB2@gmail.com> Message-ID: On 16 July 2012 13:43, Nick Tailor wrote: > Hahhahaha, google is not always your friend. It will give you like 10 different answers for things. Sometimes it's easier and time efficient to just tell them. Agreed. In fact, I'd say it's /always/ more short-term time-efficient just to tell people an answer if you have it. But doing so doesn't lead to them learning anything more than that specific bit of information. I find the Varnish-misc mailing list to be rather clueful and, unlike the lists for certain other great bits of F/LOSS, there's usually a very low level of "solve my problem for me" requests. Read the nginx list for myriad examples of that pattern in action - it's pretty boring to be around. I'm not criticising you for providing the answer in the way you did - I just personally have a low tolerance for list noise that doesn't do anything more than advance the state of someone's knowledge purely linearly. Training people to use the search (http://google.com) and documentation (https://www.varnish-cache.org/docs/3.0/) tools already at their disposal is always a good thing, IMHO. Even if it's actually "easier" just to serve the answer up on a plate instead :-) Jonathan -- Jonathan Matthews Oxford, London, UK http://www.jpluscplusm.com/contact.html From contact at jpluscplusm.com Mon Jul 16 16:54:42 2012 From: contact at jpluscplusm.com (Jonathan Matthews) Date: Mon, 16 Jul 2012 17:54:42 +0100 Subject: How to include inside vcl_recv In-Reply-To: References: <9257C7B1-C498-4380-B89F-43695E876444@gmail.com> <1EBEF53A-0847-41C6-B0DE-D80E21E10FB2@gmail.com> Message-ID: On 16 July 2012 17:13, Abraham Cruz Sustaita wrote: > Nick, thanks a lot, you were really helpfull. Jonathan, I don't need for > anybody to "feed" me. I google it in the first place, but my research only > show me how to include files outside the rules, if you read carefully my > question you will see it. The question was how to do it from other file and > inside the rule "sub vcl_recv". However thanks for your "answer", since > because of that Nick told me the answer. The only documentation I can see on this subject (https://www.varnish-cache.org/docs/3.0/reference/vcl.html) explicitly says "[t]he contents of another VCL file may be inserted at any point in the code by using the include keyword", which I believe should have answered your question, Abraham. That page was the second result you would have found when searching for "varnish cache include syntax", and the first non-trivial one. That's why I suggested those precise words for you to search for. Glad you resolved your issue either way. Jonathan -- Jonathan Matthews Oxford, London, UK http://www.jpluscplusm.com/contact.html From jonathan.windle at bellevuecollege.edu Mon Jul 16 19:28:44 2012 From: jonathan.windle at bellevuecollege.edu (Jonathan Windle) Date: Mon, 16 Jul 2012 19:28:44 +0000 Subject: Varnish + Backend with "Integrated Windows Authentication" Message-ID: <153DFB283E756A458EDB059005F39AC00C4386AC@STERLING.bellevuecollege.edu> Hello, I'm doing research to see if I can put Varnish in place as a frontend to our web servers. Some of our backend web servers are IIS and have applications that use Integrated Windows Authentication (IWA). This is what I'm using for testing. Client: Ubuntu Desktop 12.04 with Chromium 18.0.1025.168 Reverse Proxy: Ubuntu Server 12.04 with varnish-3.0.2 revision cbf1284 Backend: Windows Server 2003 IIS6 with a test site configured for IWA that has a simple index page that displays 20 images. My varnish config is like so. backend default { .host = "134.39.81.39"; .port = "80"; } sub vcl_recv { return (pass); } Under this configuration I have noticed two different scenarios. Sometimes the user is authenticated only once (like expected) and the page loads. Sometimes the user is asked to authenticated multiple times for random assets and I get a login prompt for each asset it hangs on. In both cases after I have authenticated the page with a single client the content seems to be available without authentication from any client. So at this point my question is if anyone else has run into this and has Varnish working with IWA, or if Varnish simply doesn?t support IWA. I can provide some varnish log files if that would be helpful. Thanks, Jonathan From mhettwer at team.mobile.de Tue Jul 17 14:56:02 2012 From: mhettwer at team.mobile.de (Hettwer, Marian) Date: Tue, 17 Jul 2012 14:56:02 +0000 Subject: Load Balancing and Varnish In-Reply-To: Message-ID: On 26.06.12 19:40, "Hugo Cisneiros (Eitch)" wrote: >On Tue, Jun 26, 2012 at 1:46 PM, Allan Brand >wrote: >> I'm new to Varnish and I've seen a number of discussions where Varnish >> is used in conjunction with a load balancer in the following manner: >> [LB] -> [Varnish] -> [www 1-n] >> >> I'm guessing that Varnish is running locally on the www hosts? If >> not, Is there any reason why placing Varnish in front of the load >> balancers instead would not be ideal? >> [Varnish] -> [LB} -> [www 1-n] > >Usually you use LB in front of varnish for high availability cases. >Then, if a varnish fails, the other will take over all the work. > >But there's no problem using Varnish as a load balancer as it does a >great job, as others said in this thread. But you must pay attention >to the fail over/load balancing on the varnish as well :-) I'm really missing the functionality of easily taking a backend out of load balancing. And I'm talking about gracefully going out of load balancing. As in: Established connections are still allowed, but new connections are denied. Doing it to "destroy" the probe url doesn't sound like a clean way. And rebuilding the vcl part with the backend definition doesn't sound cool either. That's sad, then apart from that, varnish is doing great as a load balancer :) And I do use it in production with machines were taking them hard out of load balancing doesn't hurt. Cheers, Marian From mhettwer at team.mobile.de Tue Jul 17 15:00:15 2012 From: mhettwer at team.mobile.de (Hettwer, Marian) Date: Tue, 17 Jul 2012 15:00:15 +0000 Subject: High BackendReuse Rate Problem In-Reply-To: Message-ID: The first defined backend is the default backend. If you have url logic in vcl_recv where you decide which backends to use for which urls, and then have requests coming in that doesn't match your url mapping logic, that request will go to the very first defined backend. However, it's strange that app1018 is the second backend. I'd suspected it to be the first backend. ./Marian On 29.06.12 12:56, "Javier Casares" wrote: >I usually see the same... the first backend in a director taks a >little bit more traffic that the others... > >I see it in 3.0.1 and 3.0.2, not tried in 3.0.3 > >Javier Casares >http://javiercasares.com/ > > >2012/6/29 Lusurf Lui : >> Hi, >> >> I'm using the Varnish-Cache-3.0.2 and have been encountered a very >> strange problem. >> >> I use a random director which is defined like this: >> ---------------------------------------------------- >> director randomlb random { >> { >> .backend = app1019; >> .weight = 15; >> } >> { >> .backend = app1018; >> .weight = 15; >> } >> { >> .backend = app1020; >> .weight = 15; >> } >> { >> .backend = app1021; >> .weight = 15; >> } >> } >> ---------------------------------------------------- >> The problem is that the BackendReuse rate of app1018 is significantly >> higher than the other backends. >> And this is a simple test case. >> ---------------------------------------------------- >> 526 BackendReuse app1018 >> ### >> 988 BackendReuse app1019 >> ### >> 561 BackendReuse app1020 >> 573 BackendReuse app1021 >> ---------------------------------------------------- >> >> What should i do to gain a balanced backendreuse rate for all the >>backends? >> >> Thanks. >> >> --- >> Lusurf >> >> _______________________________________________ >> 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 From mhettwer at team.mobile.de Tue Jul 17 15:20:09 2012 From: mhettwer at team.mobile.de (Hettwer, Marian) Date: Tue, 17 Jul 2012 15:20:09 +0000 Subject: Zero-Downtime Servicing of a Varnish Server Behind a F5 BIG-IP In-Reply-To: Message-ID: Actually the F5 box would have the same problem as you're describing for varnish. If the F5 box behaves correctly, marking the varnish out of service means that the F5 should not accept new connections, but is also not allowed to drop existing connections. Therefor I do wonder how the F5 machine would solve this without errors to the client. I would bet it also aggressively shuts down existing connections. Or if it doesn't, well okay, then there is nearly no way around it for doing it on the varnish. You might think about installing two varnish boxes in an active/passive carp(4) and pfsync(4) setup. But that means you probably have to go with FreeBSD on your server. I'm not sure about implementations of carp(4) and pfsync(4) for linux. With carp you could do the fail over you wanna do. While thinking about it, active/active carp(4) would work too. So carp(4) / pfsync(4) for the win it is! :-D HTH, Marian On 09.07.12 23:24, "Steven Engelhardt" wrote: >Because of the usage patterns of the web service, I'm not sure that even >a 1-second timeout would be sufficient to get all HTTP client connections >to close. > > >The idea of setting sess_timeout to be 0 was strictly in the context of >taking a Varnish server out of service, in order to (somewhat indirectly) >force the out of service Varnish server to close all its HTTP >connections. We would restore sess_timeout to a > sensible value before putting it back in service. > > >Steve > >On Mon, Jul 9, 2012 at 4:07 PM, Javier Casares > wrote: > >If sess_timeout is set by default to 5 seconds, you could try to set >this to 4, 3, 2 or 1 and test if has a better performance... i suposse >that set this to 0 will close all connectiond and seems to be an epic >fail... > >Javier Casares >http://javiercasares.com/ > > >2012/7/9 Steven Engelhardt : >> Just to be clear, would you suggest something like: >> 1. Mark the Varnish server as disabled in the BIG-IP >> 2. Use varnishadm to set sess_timeout to 0 to start aggressively closing >> HTTP requests? >> 3. Wait for connections to drain >> >> Steve >> >> On Mon, Jul 9, 2012 at 3:59 PM, Javier Casares >>wrote: >>> >>> >https://www.varnish-cache.org/docs/3.0/reference/varnishd.html > >>> >>> sess_timeout >>> >>> Units: seconds >>> Default: 5 >>> >>> Idle timeout for persistent sessions. If a HTTP request has not >>> been received in this many seconds, the session is closed. >>> >>> ?? >>> >>> Javier Casares >>> http://javiercasares.com/ >>> >>> >>> 2012/7/9 Steven Engelhardt : >>> > I have two Varnish servers behind a F5 BIG-IP load balancer. Both >>> > servers >>> > are constantly active and serving ~5,000 requests/second 24x7. >>>Clients >>> > aggressively use HTTP 1.1 Keep-Alives. >>> > >>> > I'm looking to develop a process for servicing and upgrading the >>>Varnish >>> > servers which results in 0 downtime to the client. Our normal >>>process >>> > for >>> > performing changes on production servers is: >>> > 1. Mark the server as disabled in the BIG-IP >>> > 2. Wait for the connections on the server to drop to 0 >>> > 3. Service the machine >>> > >>> > However, because of the aggressive and constant use of HTTP >>>Keep-Alives, >>> > clients virtually never drop their connections, and the machine >>> > continues to >>> > serve traffic for quite a long time after it is disabled in the >>>BIG-IP. >>> > >>> > Is there a way to tell Varnish to aggressively close all client HTTP >>> > connections? >>> > >>> > Thank you, >>> > Steve >>> > >>> > -- >>> > Steven Engelhardt >>> > sengelha at gmail.com >>> > >>> > _______________________________________________ >>> > 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 > >> >> >> >> >> -- >> Steven Engelhardt >> sengelha at gmail.com >> >> _______________________________________________ >> 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 > > > > > > > > >-- >Steven Engelhardt >sengelha at gmail.com > From sengelha at gmail.com Tue Jul 17 16:45:57 2012 From: sengelha at gmail.com (Steven Engelhardt) Date: Tue, 17 Jul 2012 11:45:57 -0500 Subject: Zero-Downtime Servicing of a Varnish Server Behind a F5 BIG-IP In-Reply-To: References: Message-ID: I believe we can achieve a 100% graceful restart if we can get Varnish to send a HTTP Connection: Close header for all persistent HTTP connections. It would work something like this: 1. Mark Varnish server *x* as out of service in F5 2. Tell Varnish server *x* to start closing all persistent HTTP connections by sending HTTP Connection: Close headers. After a HTTP client sees the Connection: Close header, it should open up a new HTTP connection for the next HTTP request, which the F5 will route to the other, in-service Varnish server. 3. Wait for all HTTP connections to drain from Varnish server *x* 4. Service the machine. Steve On Tue, Jul 17, 2012 at 10:20 AM, Hettwer, Marian wrote: > Actually the F5 box would have the same problem as you're describing for > varnish. > If the F5 box behaves correctly, marking the varnish out of service means > that the F5 should not accept new connections, but is also not allowed to > drop existing connections. > > Therefor I do wonder how the F5 machine would solve this without errors to > the client. > I would bet it also aggressively shuts down existing connections. > > Or if it doesn't, well okay, then there is nearly no way around it for > doing it on the varnish. > > > You might think about installing two varnish boxes in an active/passive > carp(4) and pfsync(4) setup. But that means you probably have to go with > FreeBSD on your server. I'm not sure about implementations of carp(4) and > pfsync(4) for linux. > > > With carp you could do the fail over you wanna do. > While thinking about it, active/active carp(4) would work too. > > So carp(4) / pfsync(4) for the win it is! :-D > > HTH, > Marian > > On 09.07.12 23:24, "Steven Engelhardt" wrote: > > >Because of the usage patterns of the web service, I'm not sure that even > >a 1-second timeout would be sufficient to get all HTTP client connections > >to close. > > > > > >The idea of setting sess_timeout to be 0 was strictly in the context of > >taking a Varnish server out of service, in order to (somewhat indirectly) > >force the out of service Varnish server to close all its HTTP > >connections. We would restore sess_timeout to a > > sensible value before putting it back in service. > > > > > >Steve > > > >On Mon, Jul 9, 2012 at 4:07 PM, Javier Casares > > wrote: > > > >If sess_timeout is set by default to 5 seconds, you could try to set > >this to 4, 3, 2 or 1 and test if has a better performance... i suposse > >that set this to 0 will close all connectiond and seems to be an epic > >fail... > > > >Javier Casares > >http://javiercasares.com/ > > > > > >2012/7/9 Steven Engelhardt : > >> Just to be clear, would you suggest something like: > >> 1. Mark the Varnish server as disabled in the BIG-IP > >> 2. Use varnishadm to set sess_timeout to 0 to start aggressively closing > >> HTTP requests? > >> 3. Wait for connections to drain > >> > >> Steve > >> > >> On Mon, Jul 9, 2012 at 3:59 PM, Javier Casares > >>wrote: > >>> > >>> > >https://www.varnish-cache.org/docs/3.0/reference/varnishd.html > > > >>> > >>> sess_timeout > >>> > >>> Units: seconds > >>> Default: 5 > >>> > >>> Idle timeout for persistent sessions. If a HTTP request has not > >>> been received in this many seconds, the session is closed. > >>> > >>> ?? > >>> > >>> Javier Casares > >>> http://javiercasares.com/ > >>> > >>> > >>> 2012/7/9 Steven Engelhardt : > >>> > I have two Varnish servers behind a F5 BIG-IP load balancer. Both > >>> > servers > >>> > are constantly active and serving ~5,000 requests/second 24x7. > >>>Clients > >>> > aggressively use HTTP 1.1 Keep-Alives. > >>> > > >>> > I'm looking to develop a process for servicing and upgrading the > >>>Varnish > >>> > servers which results in 0 downtime to the client. Our normal > >>>process > >>> > for > >>> > performing changes on production servers is: > >>> > 1. Mark the server as disabled in the BIG-IP > >>> > 2. Wait for the connections on the server to drop to 0 > >>> > 3. Service the machine > >>> > > >>> > However, because of the aggressive and constant use of HTTP > >>>Keep-Alives, > >>> > clients virtually never drop their connections, and the machine > >>> > continues to > >>> > serve traffic for quite a long time after it is disabled in the > >>>BIG-IP. > >>> > > >>> > Is there a way to tell Varnish to aggressively close all client HTTP > >>> > connections? > >>> > > >>> > Thank you, > >>> > Steve > >>> > > >>> > -- > >>> > Steven Engelhardt > >>> > sengelha at gmail.com > >>> > > >>> > _______________________________________________ > >>> > 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 > > > >> > >> > >> > >> > >> -- > >> Steven Engelhardt > >> sengelha at gmail.com > >> > >> _______________________________________________ > >> 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 > > > > > > > > > > > > > > > > > >-- > >Steven Engelhardt > >sengelha at gmail.com > > > > -- Steven Engelhardt sengelha at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhettwer at team.mobile.de Tue Jul 17 20:42:37 2012 From: mhettwer at team.mobile.de (Hettwer, Marian) Date: Tue, 17 Jul 2012 20:42:37 +0000 Subject: Zero-Downtime Servicing of a Varnish Server Behind a F5 BIG-IP In-Reply-To: Message-ID: On 17.07.12 18:45, "Steven Engelhardt" wrote: > > > >I believe we can achieve a 100% graceful restart if we can get Varnish to >send a HTTP Connection: Close header for all persistent HTTP connections. > It would work something like this: > > >1. Mark Varnish server x as out of service in F5 >2. Tell Varnish server x to start closing all persistent HTTP connections >by sending HTTP Connection: Close headers. After a HTTP client sees the >Connection: Close header, it should open up a new HTTP connection for the >next HTTP request, which > the F5 will route to the other, in-service Varnish server. >3. Wait for all HTTP connections to drain from Varnish server x >4. Service the machine. This absolutely sounds like a correct plan. If you achieve doing that, please let me know :) Cheers, Marian > > >Steve > >On Tue, Jul 17, 2012 at 10:20 AM, Hettwer, Marian > wrote: > >Actually the F5 box would have the same problem as you're describing for >varnish. >If the F5 box behaves correctly, marking the varnish out of service means >that the F5 should not accept new connections, but is also not allowed to >drop existing connections. > >Therefor I do wonder how the F5 machine would solve this without errors to >the client. >I would bet it also aggressively shuts down existing connections. > >Or if it doesn't, well okay, then there is nearly no way around it for >doing it on the varnish. > > >You might think about installing two varnish boxes in an active/passive >carp(4) and pfsync(4) setup. But that means you probably have to go with >FreeBSD on your server. I'm not sure about implementations of carp(4) and >pfsync(4) for linux. > > >With carp you could do the fail over you wanna do. >While thinking about it, active/active carp(4) would work too. > >So carp(4) / pfsync(4) for the win it is! :-D > >HTH, >Marian > >On 09.07.12 23:24, "Steven Engelhardt" wrote: > >>Because of the usage patterns of the web service, I'm not sure that even >>a 1-second timeout would be sufficient to get all HTTP client connections >>to close. >> >> >>The idea of setting sess_timeout to be 0 was strictly in the context of >>taking a Varnish server out of service, in order to (somewhat indirectly) >>force the out of service Varnish server to close all its HTTP >>connections. We would restore sess_timeout to a >> sensible value before putting it back in service. >> >> >>Steve >> >>On Mon, Jul 9, 2012 at 4:07 PM, Javier Casares >> wrote: >> >>If sess_timeout is set by default to 5 seconds, you could try to set >>this to 4, 3, 2 or 1 and test if has a better performance... i suposse >>that set this to 0 will close all connectiond and seems to be an epic >>fail... >> >>Javier Casares >>http://javiercasares.com/ >> >> >>2012/7/9 Steven Engelhardt : >>> Just to be clear, would you suggest something like: >>> 1. Mark the Varnish server as disabled in the BIG-IP >>> 2. Use varnishadm to set sess_timeout to 0 to start aggressively >>>closing >>> HTTP requests? >>> 3. Wait for connections to drain >>> >>> Steve >>> >>> On Mon, Jul 9, 2012 at 3:59 PM, Javier Casares >>>wrote: >>>> >>>> >>https://www.varnish-cache.org/docs/3.0/reference/varnishd.html >> >>>> >>>> sess_timeout >>>> >>>> Units: seconds >>>> Default: 5 >>>> >>>> Idle timeout for persistent sessions. If a HTTP request has not >>>> been received in this many seconds, the session is closed. >>>> >>>> ?? >>>> >>>> Javier Casares >>>> http://javiercasares.com/ >>>> >>>> >>>> 2012/7/9 Steven Engelhardt : >>>> > I have two Varnish servers behind a F5 BIG-IP load balancer. Both >>>> > servers >>>> > are constantly active and serving ~5,000 requests/second 24x7. >>>>Clients >>>> > aggressively use HTTP 1.1 Keep-Alives. >>>> > >>>> > I'm looking to develop a process for servicing and upgrading the >>>>Varnish >>>> > servers which results in 0 downtime to the client. Our normal >>>>process >>>> > for >>>> > performing changes on production servers is: >>>> > 1. Mark the server as disabled in the BIG-IP >>>> > 2. Wait for the connections on the server to drop to 0 >>>> > 3. Service the machine >>>> > >>>> > However, because of the aggressive and constant use of HTTP >>>>Keep-Alives, >>>> > clients virtually never drop their connections, and the machine >>>> > continues to >>>> > serve traffic for quite a long time after it is disabled in the >>>>BIG-IP. >>>> > >>>> > Is there a way to tell Varnish to aggressively close all client HTTP >>>> > connections? >>>> > >>>> > Thank you, >>>> > Steve >>>> > >>>> > -- >>>> > Steven Engelhardt >>>> > sengelha at gmail.com >>>> > >>>> > _______________________________________________ >>>> > 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 >> >>> >>> >>> >>> >>> -- >>> Steven Engelhardt >>> sengelha at gmail.com >>> >>> _______________________________________________ >>> 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 >> >> >> >> >> >> >> >> >>-- >>Steven Engelhardt >>sengelha at gmail.com >> > > > > > > > > > > >-- >Steven Engelhardt >sengelha at gmail.com > From abraham.sustaita at buscacorp.com Tue Jul 17 20:45:45 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Tue, 17 Jul 2012 13:45:45 -0700 Subject: Add custom server variable from Varnish Message-ID: Can I add something like set req.http.real_host = "google.com" to varnish? -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.fernandezcrisial at gmail.com Tue Jul 17 20:53:12 2012 From: roberto.fernandezcrisial at gmail.com (=?ISO-8859-1?Q?Roberto_O=2E_Fern=E1ndez_Crisial?=) Date: Tue, 17 Jul 2012 17:53:12 -0300 Subject: Add custom server variable from Varnish In-Reply-To: References: Message-ID: Hi Abraham, I think you can add req.http.X-Real-Host to vcl_recv(). Best, Roberto @rofc On Tue, Jul 17, 2012 at 5:45 PM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > Can I add something like > > set req.http.real_host = "google.com" > > to varnish? > > _______________________________________________ > 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 Jul 17 20:54:59 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Tue, 17 Jul 2012 13:54:59 -0700 Subject: Add custom server variable from Varnish In-Reply-To: References: Message-ID: Thanks a lot. Let me try it. 2012/7/17 Roberto O. Fern?ndez Crisial > Hi Abraham, > > I think you can add req.http.X-Real-Host to vcl_recv(). > > Best, > > Roberto > @rofc > > On Tue, Jul 17, 2012 at 5:45 PM, Abraham Cruz Sustaita < > abraham.sustaita at buscacorp.com> wrote: > >> Can I add something like >> >> set req.http.real_host = "google.com" >> >> to varnish? >> >> _______________________________________________ >> 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 lists at hub.org Wed Jul 18 01:35:34 2012 From: lists at hub.org (Marc Fournier) Date: Tue, 17 Jul 2012 21:35:34 -0400 Subject: Varnish 3.0.2 on FreeBSD 8-STABLE: Constant Restart In-Reply-To: References: <1636C4FA-FE82-4964-9DBA-3F180B19B057@hub.org> Message-ID: Okay, I'm lost here ? what sort of site is Varnish good for ? ? A news web site where nobody every logs into the site ? ? For instance, the impression I'm getting is that you couldn't use Varnish in front of a Facebook like site, since none of the hits would be anonymous? But would be potentially useful in front of a Slashdot like site, where alot of the hits *are* anonymous? The reason I started to look at Varnish was a client asked about it in terms of the W3T Cache that is available for Wordpress ? it apparently has the ability to 'invalidate cache' in a varnish server, so as to force it to reload from apache ? but I don't know enough about Wordpress to know if I can even safely disable cookies, but without disabling cookies, nothing will get cached, making Varnish good as a load balancer, but losing the major benefit ? ? no? On 2012-07-13, at 11:53 PM, Nick Tailor wrote: > Also you only want anonymous visits cached. All cookies with session Id should be passed to apache and then you want look trying to setup should ur backend fail run off the cache only > > Sent from my iPhone > > On Jul 13, 2012, at 10:51 AM, Marc Fournier wrote: > >> >> Morning ? >> >> OS: FreeBSD 8.3-STABLE #2: Mon Jul 2 21:20:02 UTC 2012 >> >> I am trying to use varnish as a caching front end to a wordpress site ? found some wordpress specific templetes for vcl_recv / vcl_fetch, to provide me with a base, and everything starts up, and stays running fine, *until* I change my DNS to have the domain go through Varnish ? and then it starts rebooting ? >> >> This test through, before I switched DNS, I had an uptime (according to varnish stat) of just over 1 hr ? as soon as I switched DNS over, uptime kept resetting to 0, with (after switching DNS back again), I'm currently seeing: >> >> 0+00:07:44 >> Hitrate ratio: 0 0 0 >> Hitrate avg: 0.0000 0.0000 0.0000 >> >> And, according to ps, you can see the Child much younger then the Mgr: >> >> root at lb1:/var/log # ps aux | grep varnish >> www 52281 0.0 0.0 355674084 6432 ?? IJ 5:34PM 0:00.16 varnishd: Varnish-Chld lb1.hospitalityleaders.com (varnishd) >> root 74714 0.0 0.0 98032 2636 ?? SsJ 4:21PM 0:00.13 varnishd: Varnish-Mgr lb1.hospitalityleaders.com (varnishd) >> root 71856 0.0 0.0 540 328 2 S+J 5:44PM 0:00.00 grep varnish >> >> I'm new with this, so not really sure how best to debug ? I did see something from PHK in one of my searches talking about an issue with cookies ? ? But I haven't been able to re-find that posting ? >> >> I've also, so far, been unable to find a core file, although I'm currently running a find across the whole file system to see if there isn't one ? >> >> Any suggestions on where to start debugging this, or more information I can provide, would be appreciated ? >> >> Thank you ... >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From apj at mutt.dk Wed Jul 18 07:57:44 2012 From: apj at mutt.dk (Andreas Plesner Jacobsen) Date: Wed, 18 Jul 2012 09:57:44 +0200 Subject: Varnish 3.0.2 on FreeBSD 8-STABLE: Constant Restart In-Reply-To: References: <1636C4FA-FE82-4964-9DBA-3F180B19B057@hub.org> Message-ID: <20120718075744.GN12685@nerd.dk> On Tue, Jul 17, 2012 at 09:35:34PM -0400, Marc Fournier wrote: > > Okay, I'm lost here ? what sort of site is Varnish good for ? ? A news web > site where nobody every logs into the site ? ? Varnish can be used for that, you just have to tell it to vary the cache based on the login. > For instance, the impression I'm getting is that you couldn't use Varnish in > front of a Facebook like site, since none of the hits would be anonymous? > But would be potentially useful in front of a Slashdot like site, where alot > of the hits *are* anonymous? You can use varnish in front of both (I believe that facebook actually uses varnish to some extent) > The reason I started to look at Varnish was a client asked about it in terms > of the W3T Cache that is available for Wordpress ? it apparently has the > ability to 'invalidate cache' in a varnish server, so as to force it to > reload from apache ? but I don't know enough about Wordpress to know if I can > even safely disable cookies, but without disabling cookies, nothing will get > cached, making Varnish good as a load balancer, but losing the major benefit Nothing will be cached *in the default configuration*, if Cookie-headers are present in the request or Set-Cookie headers in the response. Your task is to write the configuration that fits your application needs. -- Andreas From daniel.carrillo at gmail.com Wed Jul 18 08:01:30 2012 From: daniel.carrillo at gmail.com (Daniel Carrillo) Date: Wed, 18 Jul 2012 10:01:30 +0200 Subject: Varnish 3.0.2 on FreeBSD 8-STABLE: Constant Restart In-Reply-To: References: <1636C4FA-FE82-4964-9DBA-3F180B19B057@hub.org> Message-ID: 2012/7/18 Marc Fournier : > > Okay, I'm lost here ? what sort of site is Varnish good for ? ? A news web site where nobody every logs into the site ? ? > > For instance, the impression I'm getting is that you couldn't use Varnish in front of a Facebook like site, since none of the hits would be anonymous? But would be potentially useful in front of a Slashdot like site, where alot of the hits *are* anonymous? > > The reason I started to look at Varnish was a client asked about it in terms of the W3T Cache that is available for Wordpress ? it apparently has the ability to 'invalidate cache' in a varnish server, so as to force it to reload from apache ? but I don't know enough about Wordpress to know if I can even safely disable cookies, but without disabling cookies, nothing will get cached, making Varnish good as a load balancer, but losing the major benefit ? Hi, You don't need disable cookies, you could "pass" requests with specific cookies (wordpress_logged_in and others) In the other hand, you need a wordpres plugin in order to purge new comments, posts, etc. Check this one (includes VCL example): http://wordpress.org/extend/plugins/cd34-varnish-esi/ There is several plugins doing the job, take a look on them. Hope this helps. Kind regards. From lists at hub.org Wed Jul 18 08:21:59 2012 From: lists at hub.org (Marc Fournier) Date: Wed, 18 Jul 2012 04:21:59 -0400 Subject: Varnish 3.0.2 on FreeBSD 8-STABLE: Constant Restart In-Reply-To: References: <1636C4FA-FE82-4964-9DBA-3F180B19B057@hub.org> Message-ID: <6248DC90-2071-4D11-83BC-EED353270EF3@hub.org> Okay, at this point, I think I have to be missing something fairly obvious here, so maybe I'm asking the question wrong ? I'm not even to the point right now of caring about whether or not I have a good hit rate ? right now, I'm wondering why it consistently crashes: www 62495 0.0 0.0 355672036 6204 ?? IJ 6:43AM 0:01.32 varnishd: Varnish-Chld lb1.hospitalityleaders.com (varnishd) root 74714 0.0 0.0 98032 2364 ?? SsJ Fri04PM 0:08.97 varnishd: Varnish-Mgr lb1.hospitalityleaders.com (varnishd) If I hit the site with varnishlog running, I see: 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1342598723 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1342598726 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1342598729 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1342598732 1.0 0 WorkThread - 0x7fffff5fbbb0 start 0 WorkThread - 0x7fffff3fabb0 start 0 WorkThread - 0x7fffff1f9bb0 start 0 WorkThread - 0x7ffffedf7bb0 start 0 CLI - Rd vcl.load "boot" ./vcl.M1UEoiQY.so 0 WorkThread - 0x7ffffebf6bb0 start 0 CLI - Wr 200 36 Loaded "./vcl.M1UEoiQY.so" as "boot" 0 CLI - Rd vcl.use "boot" 0 CLI - Wr 200 0 0 CLI - Rd start 0 Debug - "Acceptor is kqueue" 0 CLI - Wr 200 0 0 WorkThread - 0x7ffffe5f3bb0 start 0 WorkThread - 0x7ffffe3f2bb0 start 0 WorkThread - 0x7ffffe1f1bb0 start 0 WorkThread - 0x7ffffdff0bb0 start 0 WorkThread - 0x7ffffddefbb0 start 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1342598737 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1342598740 1.0 And /var/log/debug.log on the machine shows: Jul 18 06:43:11 lb1 varnishd[74714]: Child cleanup complete Jul 18 08:04:23 lb1 varnishd[74714]: Child cleanup complete Now, I just modified my vcl_recv function so that all it does is 'return (pass);', and it seems to work, so I'm going to step through the code I had, to see at what point it does break ? The code I'm using as my starting point is what is available on github: https://github.com/mattiasgeniar/varnish-3.0-configuration-templates I'm not sure what I was expecting, but figured like most code, there was some sort of syntactically checker, or log error message, that would indicate what/where in the config a bug was, not it just crashing :( As I said, I will go through and see if I can't narrow down where the crash itself is occurring by slowly enabling small chunks of the config ? Thanks ... On 2012-07-18, at 3:49 AM, Robert Shilston wrote: > Marc, > > We successfully run Varnish in front of a large Wordpress site and achieve a good hit rate. At a very high level, most access is anonymous, and we simple PIPE access if there's wp-admin in the URL. We happen to use a custom plugin to manage submitting bans to Varnish, but I believe off the shelf ones are now available. > > However, undertaking putting Varnish in front of any site without a strong understanding of how the site works will not yield the best results. Only by understanding the traffic and requests will you be able to safely get a high degree of caching. > > > Rob > > On 18 Jul 2012, at 02:35, Marc Fournier wrote: > >> >> Okay, I'm lost here ? what sort of site is Varnish good for ? ? A news web site where nobody every logs into the site ? ? >> >> For instance, the impression I'm getting is that you couldn't use Varnish in front of a Facebook like site, since none of the hits would be anonymous? But would be potentially useful in front of a Slashdot like site, where alot of the hits *are* anonymous? >> >> The reason I started to look at Varnish was a client asked about it in terms of the W3T Cache that is available for Wordpress ? it apparently has the ability to 'invalidate cache' in a varnish server, so as to force it to reload from apache ? but I don't know enough about Wordpress to know if I can even safely disable cookies, but without disabling cookies, nothing will get cached, making Varnish good as a load balancer, but losing the major benefit ? >> >> ? no? >> >> >> >> On 2012-07-13, at 11:53 PM, Nick Tailor wrote: >> >>> Also you only want anonymous visits cached. All cookies with session Id should be passed to apache and then you want look trying to setup should ur backend fail run off the cache only >>> >>> Sent from my iPhone >>> >>> On Jul 13, 2012, at 10:51 AM, Marc Fournier wrote: >>> >>>> >>>> Morning ? >>>> >>>> OS: FreeBSD 8.3-STABLE #2: Mon Jul 2 21:20:02 UTC 2012 >>>> >>>> I am trying to use varnish as a caching front end to a wordpress site ? found some wordpress specific templetes for vcl_recv / vcl_fetch, to provide me with a base, and everything starts up, and stays running fine, *until* I change my DNS to have the domain go through Varnish ? and then it starts rebooting ? >>>> >>>> This test through, before I switched DNS, I had an uptime (according to varnish stat) of just over 1 hr ? as soon as I switched DNS over, uptime kept resetting to 0, with (after switching DNS back again), I'm currently seeing: >>>> >>>> 0+00:07:44 >>>> Hitrate ratio: 0 0 0 >>>> Hitrate avg: 0.0000 0.0000 0.0000 >>>> >>>> And, according to ps, you can see the Child much younger then the Mgr: >>>> >>>> root at lb1:/var/log # ps aux | grep varnish >>>> www 52281 0.0 0.0 355674084 6432 ?? IJ 5:34PM 0:00.16 varnishd: Varnish-Chld lb1.hospitalityleaders.com (varnishd) >>>> root 74714 0.0 0.0 98032 2636 ?? SsJ 4:21PM 0:00.13 varnishd: Varnish-Mgr lb1.hospitalityleaders.com (varnishd) >>>> root 71856 0.0 0.0 540 328 2 S+J 5:44PM 0:00.00 grep varnish >>>> >>>> I'm new with this, so not really sure how best to debug ? I did see something from PHK in one of my searches talking about an issue with cookies ? ? But I haven't been able to re-find that posting ? >>>> >>>> I've also, so far, been unable to find a core file, although I'm currently running a find across the whole file system to see if there isn't one ? >>>> >>>> Any suggestions on where to start debugging this, or more information I can provide, would be appreciated ? >>>> >>>> Thank you ... >>>> _______________________________________________ >>>> 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 > From apj at mutt.dk Wed Jul 18 09:06:20 2012 From: apj at mutt.dk (Andreas Plesner Jacobsen) Date: Wed, 18 Jul 2012 11:06:20 +0200 Subject: Varnish 3.0.2 on FreeBSD 8-STABLE: Constant Restart In-Reply-To: <6248DC90-2071-4D11-83BC-EED353270EF3@hub.org> References: <1636C4FA-FE82-4964-9DBA-3F180B19B057@hub.org> <6248DC90-2071-4D11-83BC-EED353270EF3@hub.org> Message-ID: <20120718090620.GO12685@nerd.dk> On Wed, Jul 18, 2012 at 04:21:59AM -0400, Marc Fournier wrote: > > I'm not sure what I was expecting, but figured like most code, there was some > sort of syntactically checker, or log error message, that would indicate > what/where in the config a bug was, not it just crashing :( There is, but obviously it has missing something in your config. Crashes will both be syslogged and registered by the master process so you can view them using "panic.show" from varnishadmin. -- Andreas From abraham.sustaita at buscacorp.com Wed Jul 18 23:55:58 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Wed, 18 Jul 2012 16:55:58 -0700 Subject: I have no idea why backend is sick Message-ID: I have 8 servers, 7 of them are working as they supposed to be working. However, I have app02, and it is not working. The first problem I noticed was it was reporting errors even when I change the error reporting to off. The second problem, and the one that is give me troubles, is that after I reboot the server, it is not working. I have this in the log: varnishlog | grep app02 0 Backend_health - app02 Still healthy 4--X-R- 3 3 5 0.000488 0.000000 HTTP/1.1 301 Moved Permanently 5 BackendOpen b app02 192.168.11.42 48452 192.168.11.32 80 5 BackendReuse b app02 4 Backend c 5 old app02 4 ObjHeader c b_n: app02 4 TxHeader c b_n: app02 37 BackendOpen b app02 192.168.11.42 48460 192.168.11.32 80 37 BackendReuse b app02 5 BackendReuse b app02 20 Backend c 5 old app02 20 ObjHeader c b_n: app02 20 TxHeader c b_n: app02 28 Backend c 37 old app02 28 ObjHeader c b_n: app02 28 TxHeader c b_n: app02 0 Backend_health - app02 Went sick 4--X-R- 2 3 5 0.000722 0.000000 HTTP/1.1 301 Moved Permanently 5 BackendReuse b app02 68 Backend c 5 old app02 68 ObjHeader c b_n: app02 68 TxHeader c b_n: app02 37 BackendReuse b app02 75 Backend c 37 old app02 75 ObjHeader c b_n: app02 75 TxHeader c b_n: app02 123 TxHeader c b_n: app02 259 TxHeader c b_n: app02 187 TxHeader c b_n: app02 0 Backend_health - app02 Still sick 4--X-R- 1 3 5 0.000520 0.000000 HTTP/1.1 301 Moved Permanently 67 TxHeader c b_n: app02 0 Backend_health - app02 Still sick 4--X-R- 0 3 5 0.000503 0.000000 HTTP/1.1 301 Moved Permanently But the problem is that the server is working ok. If I do wget app02 from varnish, it returns what it is supposed to return! But varnish says that it went sick... Is there anyway I can trace this? I have modified my hosts file in order to point www.domain.com to app02 so I can do wget www.domain.com (www.domain.com is the domain I have in that server), and it response as it supposed: wget --server-response --spider www.domain.com Spider mode enabled. Check if remote file exists. --2012-07-18 23:53:20-- http://www.domain.com/ Resolving www.domain.com... 192.168.11.32 Connecting to www.domain.com|192.168.11.32|:80... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Wed, 18 Jul 2012 23:53:20 GMT Server: Apache/2.2.22 (Fedora) X-Powered-By: PHP/5.4.4 Set-Cookie: sessionToken=a73cdcde6439423231f19f7ce6870ae7; expires=Thu, 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com Set-Cookie: sessionToken=46560b800baa0ee9cf0f7eeea8dc1add; expires=Thu, 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com Set-Cookie: sessionToken=8bfa42f1782db58726ebdc500ede7705; expires=Thu, 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com Vary: Accept-Encoding Cache-Control: no-store, no-cache, must-revalidate, max-age=0 Pragma: no-cache Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 Length: unspecified [text/html] Remote file exists and could contain further links, but recursion is disabled -- not retrieving. -------------- next part -------------- An HTML attachment was scrubbed... URL: From shib4u at gmail.com Thu Jul 19 00:15:21 2012 From: shib4u at gmail.com (Shibashish) Date: Wed, 18 Jul 2012 17:15:21 -0700 Subject: I have no idea why backend is sick In-Reply-To: References: Message-ID: On Wed, Jul 18, 2012 at 4:55 PM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > I have 8 servers, 7 of them are working as they supposed to be working. > However, I have app02, and it is not working. The first problem I noticed > was it was reporting errors even when I change the error reporting to off. > The second problem, and the one that is give me troubles, is that after I > reboot the server, it is not working. I have this in the log: > > varnishlog | grep app02 > 0 Backend_health - app02 Still healthy 4--X-R- 3 3 5 0.000488 0.000000 > HTTP/1.1 301 Moved Permanently > 5 BackendOpen b app02 192.168.11.42 48452 192.168.11.32 80 > 5 BackendReuse b app02 > 4 Backend c 5 old app02 > 4 ObjHeader c b_n: app02 > 4 TxHeader c b_n: app02 > 37 BackendOpen b app02 192.168.11.42 48460 192.168.11.32 80 > 37 BackendReuse b app02 > 5 BackendReuse b app02 > 20 Backend c 5 old app02 > 20 ObjHeader c b_n: app02 > 20 TxHeader c b_n: app02 > 28 Backend c 37 old app02 > 28 ObjHeader c b_n: app02 > 28 TxHeader c b_n: app02 > 0 Backend_health - app02 Went sick 4--X-R- 2 3 5 0.000722 0.000000 > HTTP/1.1 301 Moved Permanently > 5 BackendReuse b app02 > 68 Backend c 5 old app02 > 68 ObjHeader c b_n: app02 > 68 TxHeader c b_n: app02 > 37 BackendReuse b app02 > 75 Backend c 37 old app02 > 75 ObjHeader c b_n: app02 > 75 TxHeader c b_n: app02 > 123 TxHeader c b_n: app02 > 259 TxHeader c b_n: app02 > 187 TxHeader c b_n: app02 > 0 Backend_health - app02 Still sick 4--X-R- 1 3 5 0.000520 0.000000 > HTTP/1.1 301 Moved Permanently > 67 TxHeader c b_n: app02 > 0 Backend_health - app02 Still sick 4--X-R- 0 3 5 0.000503 0.000000 > HTTP/1.1 301 Moved Permanently > > But the problem is that the server is working ok. If I do wget app02 from > varnish, it returns what it is supposed to return! But varnish says that it > went sick... Is there anyway I can trace this? > > I have modified my hosts file in order to point www.domain.com to app02 > so I can do wget www.domain.com (www.domain.com is the domain I have in > that server), and it response as it supposed: > > wget --server-response --spider www.domain.com > Spider mode enabled. Check if remote file exists. > --2012-07-18 23:53:20-- http://www.domain.com/ > Resolving www.domain.com... 192.168.11.32 > Connecting to www.domain.com|192.168.11.32|:80... connected. > HTTP request sent, awaiting response... > HTTP/1.1 200 OK > Date: Wed, 18 Jul 2012 23:53:20 GMT > Server: Apache/2.2.22 (Fedora) > X-Powered-By: PHP/5.4.4 > Set-Cookie: sessionToken=a73cdcde6439423231f19f7ce6870ae7; expires=Thu, > 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com > Set-Cookie: sessionToken=46560b800baa0ee9cf0f7eeea8dc1add; expires=Thu, > 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com > Set-Cookie: sessionToken=8bfa42f1782db58726ebdc500ede7705; expires=Thu, > 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com > Vary: Accept-Encoding > Cache-Control: no-store, no-cache, must-revalidate, max-age=0 > Pragma: no-cache > Keep-Alive: timeout=15, max=100 > Connection: Keep-Alive > Content-Type: text/html; charset=iso-8859-1 > Length: unspecified [text/html] > Remote file exists and could contain further links, > but recursion is disabled -- not retrieving. > > > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > Show us the relevant vcl config. Also, u can see Varnish is getting 301 but wget getting 200, so check the config and backend again. -- ShiB. while ( ! ( succeed = try() ) ); -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Thu Jul 19 00:31:43 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Wed, 18 Jul 2012 17:31:43 -0700 Subject: I have no idea why backend is sick In-Reply-To: References: Message-ID: I have all the sections in separated files: At backend.vcl backend app02 { .host = "app02.domain.com"; .port = "80"; .connect_timeout = 1.5s; .first_byte_timeout = 45s; .between_bytes_timeout = 30s; .probe = { .url = "/health-check.html"; .interval = 1s; .timeout = 30s; .window = 10; .threshold = 8; } } At vcl_recv.vcl: #request to beta if (req.http.Host == "www.domain.com") { set req.backend = app02; } 2012/7/18 Shibashish > On Wed, Jul 18, 2012 at 4:55 PM, Abraham Cruz Sustaita < > abraham.sustaita at buscacorp.com> wrote: > >> I have 8 servers, 7 of them are working as they supposed to be working. >> However, I have app02, and it is not working. The first problem I noticed >> was it was reporting errors even when I change the error reporting to off. >> The second problem, and the one that is give me troubles, is that after I >> reboot the server, it is not working. I have this in the log: >> >> varnishlog | grep app02 >> 0 Backend_health - app02 Still healthy 4--X-R- 3 3 5 0.000488 >> 0.000000 HTTP/1.1 301 Moved Permanently >> 5 BackendOpen b app02 192.168.11.42 48452 192.168.11.32 80 >> 5 BackendReuse b app02 >> 4 Backend c 5 old app02 >> 4 ObjHeader c b_n: app02 >> 4 TxHeader c b_n: app02 >> 37 BackendOpen b app02 192.168.11.42 48460 192.168.11.32 80 >> 37 BackendReuse b app02 >> 5 BackendReuse b app02 >> 20 Backend c 5 old app02 >> 20 ObjHeader c b_n: app02 >> 20 TxHeader c b_n: app02 >> 28 Backend c 37 old app02 >> 28 ObjHeader c b_n: app02 >> 28 TxHeader c b_n: app02 >> 0 Backend_health - app02 Went sick 4--X-R- 2 3 5 0.000722 0.000000 >> HTTP/1.1 301 Moved Permanently >> 5 BackendReuse b app02 >> 68 Backend c 5 old app02 >> 68 ObjHeader c b_n: app02 >> 68 TxHeader c b_n: app02 >> 37 BackendReuse b app02 >> 75 Backend c 37 old app02 >> 75 ObjHeader c b_n: app02 >> 75 TxHeader c b_n: app02 >> 123 TxHeader c b_n: app02 >> 259 TxHeader c b_n: app02 >> 187 TxHeader c b_n: app02 >> 0 Backend_health - app02 Still sick 4--X-R- 1 3 5 0.000520 0.000000 >> HTTP/1.1 301 Moved Permanently >> 67 TxHeader c b_n: app02 >> 0 Backend_health - app02 Still sick 4--X-R- 0 3 5 0.000503 0.000000 >> HTTP/1.1 301 Moved Permanently >> >> But the problem is that the server is working ok. If I do wget app02 from >> varnish, it returns what it is supposed to return! But varnish says that it >> went sick... Is there anyway I can trace this? >> >> I have modified my hosts file in order to point www.domain.com to app02 >> so I can do wget www.domain.com (www.domain.com is the domain I have in >> that server), and it response as it supposed: >> >> wget --server-response --spider www.domain.com >> Spider mode enabled. Check if remote file exists. >> --2012-07-18 23:53:20-- http://www.domain.com/ >> Resolving www.domain.com... 192.168.11.32 >> Connecting to www.domain.com|192.168.11.32|:80... connected. >> HTTP request sent, awaiting response... >> HTTP/1.1 200 OK >> Date: Wed, 18 Jul 2012 23:53:20 GMT >> Server: Apache/2.2.22 (Fedora) >> X-Powered-By: PHP/5.4.4 >> Set-Cookie: sessionToken=a73cdcde6439423231f19f7ce6870ae7; expires=Thu, >> 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com >> Set-Cookie: sessionToken=46560b800baa0ee9cf0f7eeea8dc1add; expires=Thu, >> 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com >> Set-Cookie: sessionToken=8bfa42f1782db58726ebdc500ede7705; expires=Thu, >> 18-Jul-2013 23:53:21 GMT; path=/; domain=.domain.com >> Vary: Accept-Encoding >> Cache-Control: no-store, no-cache, must-revalidate, max-age=0 >> Pragma: no-cache >> Keep-Alive: timeout=15, max=100 >> Connection: Keep-Alive >> Content-Type: text/html; charset=iso-8859-1 >> Length: unspecified [text/html] >> Remote file exists and could contain further links, >> but recursion is disabled -- not retrieving. >> >> >> >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > > > Show us the relevant vcl config. > > Also, u can see Varnish is getting 301 but wget getting 200, so check the > config and backend again. > > -- > ShiB. > while ( ! ( succeed = try() ) ); > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shib4u at gmail.com Thu Jul 19 00:46:07 2012 From: shib4u at gmail.com (Shibashish) Date: Wed, 18 Jul 2012 17:46:07 -0700 Subject: I have no idea why backend is sick In-Reply-To: References: Message-ID: On Wed, Jul 18, 2012 at 5:31 PM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > I have all the sections in separated files: > > At backend.vcl > > backend app02 { > .host = "app02.domain.com"; > .port = "80"; > .connect_timeout = 1.5s; > .first_byte_timeout = 45s; > .between_bytes_timeout = 30s; > .probe = { > .url = "/health-check.html"; > .interval = 1s; > .timeout = 30s; > .window = 10; > .threshold = 8; > } > } > > At vcl_recv.vcl: > > #request to beta > if (req.http.Host == "www.domain.com") { > set req.backend = app02; > > } > > On app02... apachectl -S >From varnish host... wget -s http://app02.domain.com/health-check.html wget --header="Host: www.domain.com" app02.domain.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hugo.cisneiros at gmail.com Thu Jul 19 01:02:49 2012 From: hugo.cisneiros at gmail.com (Hugo Cisneiros (Eitch)) Date: Wed, 18 Jul 2012 22:02:49 -0300 Subject: I have no idea why backend is sick In-Reply-To: References: Message-ID: On Wed, Jul 18, 2012 at 8:55 PM, Abraham Cruz Sustaita wrote: > I have 8 servers, 7 of them are working as they supposed to be working. > However, I have app02, and it is not working. The first problem I noticed > was it was reporting errors even when I change the error reporting to off. > The second problem, and the one that is give me troubles, is that after I > reboot the server, it is not working. I have this in the log: > > varnishlog | grep app02 > 0 Backend_health - app02 Still healthy 4--X-R- 3 3 5 0.000488 0.000000 > HTTP/1.1 301 Moved Permanently [...] > 0 Backend_health - app02 Went sick 4--X-R- 2 3 5 0.000722 0.000000 > HTTP/1.1 301 Moved Permanently [...] > 0 Backend_health - app02 Still sick 4--X-R- 0 3 5 0.000503 0.000000 > HTTP/1.1 301 Moved Permanently > > But the problem is that the server is working ok. If I do wget app02 from > varnish, it returns what it is supposed to return! But varnish says that it > went sick... Is there anyway I can trace this? As Shibashish said in the thread, the two requests (varnish and wget) aren't the same, since Varnish does not specify the Host header and your wget does. Probably, your Apache configuration isn't catching Varnish's request because it's not in the correspondent VirtualHost, and it's using the default configuration. To simulate your varnish's probe, you have to do: wget -O /dev/null -S http://app02.domain.com/health-check.html *without* hosts or anything. It must return HTTP 200. Take a look at Apache's global configuration and see if it's redirecting. Use wget to help identify the redirects. -- []'s Hugo www.devin.com.br From abraham.sustaita at buscacorp.com Thu Jul 19 01:07:52 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Wed, 18 Jul 2012 18:07:52 -0700 Subject: I have no idea why backend is sick In-Reply-To: References: Message-ID: I can see that's exact the problem... so now I have to figured it out why two servers with the exact same configuration have different results... Thanks to all for your help. 2012/7/18 Hugo Cisneiros (Eitch) > On Wed, Jul 18, 2012 at 8:55 PM, Abraham Cruz Sustaita > wrote: > > I have 8 servers, 7 of them are working as they supposed to be working. > > However, I have app02, and it is not working. The first problem I noticed > > was it was reporting errors even when I change the error reporting to > off. > > The second problem, and the one that is give me troubles, is that after I > > reboot the server, it is not working. I have this in the log: > > > > varnishlog | grep app02 > > 0 Backend_health - app02 Still healthy 4--X-R- 3 3 5 0.000488 > 0.000000 > > HTTP/1.1 301 Moved Permanently > [...] > > 0 Backend_health - app02 Went sick 4--X-R- 2 3 5 0.000722 0.000000 > > HTTP/1.1 301 Moved Permanently > [...] > > 0 Backend_health - app02 Still sick 4--X-R- 0 3 5 0.000503 0.000000 > > HTTP/1.1 301 Moved Permanently > > > > But the problem is that the server is working ok. If I do wget app02 from > > varnish, it returns what it is supposed to return! But varnish says that > it > > went sick... Is there anyway I can trace this? > > As Shibashish said in the thread, the two requests (varnish and wget) > aren't the same, since Varnish does not specify the Host header and > your wget does. > > Probably, your Apache configuration isn't catching Varnish's request > because it's not in the correspondent VirtualHost, and it's using the > default configuration. To simulate your varnish's probe, you have to > do: > > wget -O /dev/null -S http://app02.domain.com/health-check.html > > *without* hosts or anything. It must return HTTP 200. Take a look at > Apache's global configuration and see if it's redirecting. Use wget to > help identify the redirects. > > -- > []'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 n.j.saunders at gmail.com Thu Jul 19 09:34:19 2012 From: n.j.saunders at gmail.com (Neil Saunders) Date: Thu, 19 Jul 2012 10:34:19 +0100 Subject: Varnish CPU thrashing: Failing to serve requests Message-ID: Hi - We run 3 Varnish instance in EC2 behind Load Balancer - This setup has performed solidly since it's installation. This morning I came in to find that 2 of the 3 instances thrashing the CPU and failing to serve requests. Our monitoring shows that there was a notable (20%) CPU steal in availability zones A & B starting at 6:30, but I note that this has also occurred in the past and has not caused us any issues previously. We've restarted one of the problem instances and dropped the other out the load balancer to perform root cause analysis. The dropped host is not not serving any requests but is still maxing out the CPU. There are 50 varnish threads running, and ps thread dump reveals a single thread spinning at >90%. root 1235 1 1235 0 1 May03 ? 00:00:00 /bin/bash /etc/rc2.d/S20varnishlog-backend start root 1236 1235 1236 0 1 May03 ? 00:59:11 varnishlog -u -i Backend_health root 1240 1235 1240 0 1 May03 ? 00:00:26 logger -t varnishlog root 12688 1 12688 0 1 Jul17 ? 00:00:09 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f /etc/varnish/varnish.vcl -s malloc,6800M nobody 13015 12688 21589 0 48 06:30 ? 00:00:00 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f /etc/varnish/varnish.vcl -s malloc,6800M nobody 13015 12688 21611 0 48 06:30 ? 00:00:00 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f /etc/varnish/varnish.vcl -s malloc,6800M nobody 13015 12688 21612 93 48 06:30 ? 03:39:06 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f /etc/varnish/varnish.vcl -s malloc,6800M nobody 13015 12688 21614 0 48 06:30 ? 00:00:00 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f /etc/varnish/varnish.vcl -s malloc,6800M Can anyone recommend next steps in terms of dianosing what's going on here? I'm at a loss! Thanks in advance, Neil Saunders From n.j.saunders at gmail.com Thu Jul 19 09:45:30 2012 From: n.j.saunders at gmail.com (Neil Saunders) Date: Thu, 19 Jul 2012 10:45:30 +0100 Subject: Varnish CPU thrashing: Failing to serve requests In-Reply-To: References: Message-ID: Varnishstat output: # varnishstat -1 client_conn 595181 4.57 Client connections accepted client_drop 0 0.00 Connection dropped, no sess/wrk client_req 2372854 18.20 Client requests received cache_hit 1422781 10.91 Cache hits cache_hitpass 161 0.00 Cache hits for pass cache_miss 832622 6.39 Cache misses backend_conn 161225 1.24 Backend conn. success backend_unhealthy 0 0.00 Backend conn. not attempted backend_busy 0 0.00 Backend conn. too many backend_fail 41 0.00 Backend conn. failures backend_reuse 547909 4.20 Backend conn. reuses backend_toolate 57162 0.44 Backend conn. was closed backend_recycle 605090 4.64 Backend conn. recycles backend_retry 944 0.01 Backend conn. retry fetch_head 771 0.01 Fetch head fetch_length 566657 4.35 Fetch with Length fetch_chunked 132107 1.01 Fetch chunked fetch_eof 0 0.00 Fetch EOF fetch_bad 0 0.00 Fetch had bad headers fetch_close 0 0.00 Fetch wanted close fetch_oldhttp 0 0.00 Fetch pre HTTP/1.1 closed fetch_zero 0 0.00 Fetch zero len fetch_failed 449 0.00 Fetch failed fetch_1xx 0 0.00 Fetch no body (1xx) fetch_204 0 0.00 Fetch no body (204) fetch_304 2802 0.02 Fetch no body (304) n_sess_mem 351 . N struct sess_mem n_sess 32 . N struct sess n_object 73004 . N struct object n_vampireobject 0 . N unresurrected objects n_objectcore 73008 . N struct objectcore n_objecthead 18790 . N struct objecthead n_waitinglist 6847 . N struct waitinglist n_vbc 20 . N struct vbc n_wrk 16 . N worker threads n_wrk_create 2728 0.02 N worker threads created n_wrk_failed 0 0.00 N worker threads not created n_wrk_max 0 0.00 N worker threads limited n_wrk_lqueue 2 0.00 work request queue length n_wrk_queued 9127 0.07 N queued work requests n_wrk_drop 0 0.00 N dropped work requests n_backend 23 . N backends n_expired 514339 . N expired objects n_lru_nuked 0 . N LRU nuked objects n_lru_moved 593159 . N LRU moved objects losthdr 0 0.00 HTTP header overflows n_objsendfile 0 0.00 Objects sent with sendfile n_objwrite 2257927 17.32 Objects sent with write n_objoverflow 0 0.00 Objects overflowing workspace s_sess 595172 4.57 Total Sessions s_req 2372854 18.20 Total Requests s_pipe 0 0.00 Total pipe s_pass 114290 0.88 Total pass s_fetch 701505 5.38 Total fetch s_hdrbytes 1088723796 8352.25 Total header bytes s_bodybytes 23256734944 178416.24 Total body bytes sess_closed 249051 1.91 Session Closed sess_pipeline 0 0.00 Session Pipeline sess_readahead 0 0.00 Session Read Ahead sess_linger 2123886 16.29 Session Linger sess_herd 1048297 8.04 Session herd shm_records 150270766 1152.82 SHM records shm_writes 7788531 59.75 SHM writes shm_flushes 0 0.00 SHM flushes due to overflow shm_cont 3252 0.02 SHM MTX contention shm_cycles 60 0.00 SHM cycles through buffer sms_nreq 245202 1.88 SMS allocator requests sms_nobj 0 . SMS outstanding allocations sms_nbytes 0 . SMS outstanding bytes sms_balloc 102585117 . SMS bytes allocated sms_bfree 102585117 . SMS bytes freed backend_req 709136 5.44 Backend requests made n_vcl 1 0.00 N vcl total n_vcl_avail 1 0.00 N vcl available n_vcl_discard 0 0.00 N vcl discarded n_ban 1 . N total active bans n_ban_add 1 0.00 N new bans added n_ban_retire 0 0.00 N old bans deleted n_ban_obj_test 0 0.00 N objects tested n_ban_re_test 0 0.00 N regexps tested against n_ban_dups 0 0.00 N duplicate bans removed hcb_nolock 2255564 17.30 HCB Lookups without lock hcb_lock 328164 2.52 HCB Lookups with lock hcb_insert 328160 2.52 HCB Inserts esi_errors 0 0.00 ESI parse errors (unlock) esi_warnings 0 0.00 ESI parse warnings (unlock) accept_fail 0 0.00 Accept failures client_drop_late 0 0.00 Connection dropped late uptime 130351 1.00 Client uptime dir_dns_lookups 0 0.00 DNS director lookups dir_dns_failed 0 0.00 DNS director failed lookups dir_dns_hit 0 0.00 DNS director cached lookups hit dir_dns_cache_full 0 0.00 DNS director full dnscache vmods 0 . Loaded VMODs n_gzip 0 0.00 Gzip operations n_gunzip 681986 5.23 Gunzip operations LCK.sms.creat 3 0.00 Created locks LCK.sms.destroy 0 0.00 Destroyed locks LCK.sms.locks 736368 5.65 Lock Operations LCK.sms.colls 0 0.00 Collisions LCK.smp.creat 0 0.00 Created locks LCK.smp.destroy 0 0.00 Destroyed locks LCK.smp.locks 0 0.00 Lock Operations LCK.smp.colls 0 0.00 Collisions LCK.sma.creat 6 0.00 Created locks LCK.sma.destroy 0 0.00 Destroyed locks LCK.sma.locks 3744137 28.72 Lock Operations LCK.sma.colls 0 0.00 Collisions LCK.smf.creat 0 0.00 Created locks LCK.smf.destroy 0 0.00 Destroyed locks LCK.smf.locks 0 0.00 Lock Operations LCK.smf.colls 0 0.00 Collisions LCK.hsl.creat 0 0.00 Created locks LCK.hsl.destroy 0 0.00 Destroyed locks LCK.hsl.locks 0 0.00 Lock Operations LCK.hsl.colls 0 0.00 Collisions LCK.hcb.creat 3 0.00 Created locks LCK.hcb.destroy 0 0.00 Destroyed locks LCK.hcb.locks 653775 5.02 Lock Operations LCK.hcb.colls 0 0.00 Collisions LCK.hcl.creat 0 0.00 Created locks LCK.hcl.destroy 0 0.00 Destroyed locks LCK.hcl.locks 0 0.00 Lock Operations LCK.hcl.colls 0 0.00 Collisions LCK.vcl.creat 3 0.00 Created locks LCK.vcl.destroy 0 0.00 Destroyed locks LCK.vcl.locks 21067 0.16 Lock Operations LCK.vcl.colls 0 0.00 Collisions LCK.stat.creat 3 0.00 Created locks LCK.stat.destroy 0 0.00 Destroyed locks LCK.stat.locks 625 0.00 Lock Operations LCK.stat.colls 0 0.00 Collisions LCK.sessmem.creat 3 0.00 Created locks LCK.sessmem.destroy 0 0.00 Destroyed locks LCK.sessmem.locks 619699 4.75 Lock Operations LCK.sessmem.colls 0 0.00 Collisions LCK.wstat.creat 3 0.00 Created locks LCK.wstat.destroy 0 0.00 Destroyed locks LCK.wstat.locks 415560 3.19 Lock Operations LCK.wstat.colls 0 0.00 Collisions LCK.herder.creat 3 0.00 Created locks LCK.herder.destroy 0 0.00 Destroyed locks LCK.herder.locks 7973 0.06 Lock Operations LCK.herder.colls 0 0.00 Collisions LCK.wq.creat 6 0.00 Created locks LCK.wq.destroy 0 0.00 Destroyed locks LCK.wq.locks 3001206 23.02 Lock Operations LCK.wq.colls 0 0.00 Collisions LCK.objhdr.creat 345509 2.65 Created locks LCK.objhdr.destroy 312172 2.39 Destroyed locks LCK.objhdr.locks 10885207 83.51 Lock Operations LCK.objhdr.colls 0 0.00 Collisions LCK.exp.creat 3 0.00 Created locks LCK.exp.destroy 0 0.00 Destroyed locks LCK.exp.locks 1277776 9.80 Lock Operations LCK.exp.colls 0 0.00 Collisions LCK.lru.creat 6 0.00 Created locks LCK.lru.destroy 0 0.00 Destroyed locks LCK.lru.locks 642289 4.93 Lock Operations LCK.lru.colls 0 0.00 Collisions LCK.cli.creat 3 0.00 Created locks LCK.cli.destroy 0 0.00 Destroyed locks LCK.cli.locks 45862 0.35 Lock Operations LCK.cli.colls 0 0.00 Collisions LCK.ban.creat 3 0.00 Created locks LCK.ban.destroy 0 0.00 Destroyed locks LCK.ban.locks 1293221 9.92 Lock Operations LCK.ban.colls 0 0.00 Collisions LCK.vbp.creat 3 0.00 Created locks LCK.vbp.destroy 0 0.00 Destroyed locks LCK.vbp.locks 946642 7.26 Lock Operations LCK.vbp.colls 0 0.00 Collisions LCK.vbe.creat 3 0.00 Created locks LCK.vbe.destroy 0 0.00 Destroyed locks LCK.vbe.locks 340230 2.61 Lock Operations LCK.vbe.colls 0 0.00 Collisions LCK.backend.creat 69 0.00 Created locks LCK.backend.destroy 0 0.00 Destroyed locks LCK.backend.locks 3139847 24.09 Lock Operations LCK.backend.colls 0 0.00 Collisions SMA.s0.c_req 781537 6.00 Allocator requests SMA.s0.c_fail 0 0.00 Allocator failures SMA.s0.c_bytes 42478599218 325878.58 Bytes allocated SMA.s0.c_freed 40948642433 314141.38 Bytes freed SMA.s0.g_alloc 95619 . Allocations outstanding SMA.s0.g_bytes 1529956785 . Bytes outstanding SMA.s0.g_space 5600360015 . Bytes available SMA.Transient.c_req 774135 5.94 Allocator requests SMA.Transient.c_fail 0 0.00 Allocator failures SMA.Transient.c_bytes 44114234836 338426.52 Bytes allocated SMA.Transient.c_freed 44084118402 338195.48 Bytes freed SMA.Transient.g_alloc 51006 . Allocations outstanding SMA.Transient.g_bytes 30116434 . Bytes outstanding SMA.Transient.g_space 0 . Bytes available On Thu, Jul 19, 2012 at 10:34 AM, Neil Saunders wrote: > Hi - > > We run 3 Varnish instance in EC2 behind Load Balancer - This setup has > performed solidly since it's installation. > > This morning I came in to find that 2 of the 3 instances thrashing the > CPU and failing to serve requests. Our monitoring shows that there was > a notable (20%) CPU steal in availability zones A & B starting at > 6:30, but I note that this has also occurred in the past and has not > caused us any issues previously. We've restarted one of the problem > instances and dropped the other out the load balancer to perform root > cause analysis. > > The dropped host is not not serving any requests but is still maxing > out the CPU. There are 50 varnish threads running, and ps thread dump > reveals a single thread spinning at >90%. > > root 1235 1 1235 0 1 May03 ? 00:00:00 /bin/bash > /etc/rc2.d/S20varnishlog-backend start > root 1236 1235 1236 0 1 May03 ? 00:59:11 varnishlog > -u -i Backend_health > root 1240 1235 1240 0 1 May03 ? 00:00:26 logger -t varnishlog > root 12688 1 12688 0 1 Jul17 ? 00:00:09 > /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f > /etc/varnish/varnish.vcl -s malloc,6800M > > nobody 13015 12688 21589 0 48 06:30 ? 00:00:00 > /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f > /etc/varnish/varnish.vcl -s malloc,6800M > nobody 13015 12688 21611 0 48 06:30 ? 00:00:00 > /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f > /etc/varnish/varnish.vcl -s malloc,6800M > nobody 13015 12688 21612 93 48 06:30 ? 03:39:06 > /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f > /etc/varnish/varnish.vcl -s malloc,6800M > nobody 13015 12688 21614 0 48 06:30 ? 00:00:00 > /usr/sbin/varnishd -P /var/run/varnishd.pid -a :80 -T :8082 -f > /etc/varnish/varnish.vcl -s malloc,6800M > > > Can anyone recommend next steps in terms of dianosing what's going on > here? I'm at a loss! > > Thanks in advance, > > Neil Saunders From tuanclq at vng.com.vn Thu Jul 19 10:26:24 2012 From: tuanclq at vng.com.vn (Tuan. Co Le Quoc) Date: Thu, 19 Jul 2012 10:26:24 +0000 Subject: Error when compiling Varnish-3.0.2 on CentOS 5.8 Message-ID: Hi, i got some errors when compiling Varnish 3.0.2 on my CentOS 5.8 make[3]: Entering directory `/src/varnish-3.0.2/lib/libvarnishcompat' if /bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -g -O2 -pthread -Wextra -Wno-missing-field-initializers -Wno-sign-compare -MT daemon.lo -MD -MP -MF ".deps/daemon.Tpo" -c -o daemon.lo daemon.c; \ then mv -f ".deps/daemon.Tpo" ".deps/daemon.Plo"; else rm -f ".deps/daemon.Tpo"; exit 1; fi ../../libtool: line 852: X--tag=CC: command not found ../../libtool: line 885: libtool: ignoring unknown tag : command not found ../../libtool: line 852: X--mode=compile: command not found ../../libtool: line 1018: *** Warning: inferring the mode of operation is deprecated.: command not found ../../libtool: line 1019: *** Future versions of Libtool will require --mode=MODE be specified.: command not found ../../libtool: line 1162: Xgcc: command not found ../../libtool: line 1162: X-std=gnu99: command not found ../../libtool: line 1162: X-DHAVE_CONFIG_H: command not found ../../libtool: line 1162: X-I.: command not found ../../libtool: line 1162: X-I.: command not found ../../libtool: line 1162: X-I../..: No such file or directory ../../libtool: line 1162: X-I../../include: No such file or directory ../../libtool: line 1162: X-g: command not found ../../libtool: line 1162: X-O2: command not found ../../libtool: line 1162: X-pthread: command not found ../../libtool: line 1162: X-Wextra: command not found ../../libtool: line 1162: X-Wno-missing-field-initializers: command not found ../../libtool: line 1162: X-Wno-sign-compare: command not found ../../libtool: line 1162: X-MT: command not found ../../libtool: line 1162: Xdaemon.lo: command not found ../../libtool: line 1162: X-MD: command not found ../../libtool: line 1162: X-MP: command not found ../../libtool: line 1162: X-MF: command not found ../../libtool: line 1162: X.deps/daemon.Tpo: No such file or directory ../../libtool: line 1162: X-c: command not found ../../libtool: line 1214: Xdaemon.lo: command not found ../../libtool: line 1219: libtool: compile: cannot determine name of library object from `': command not found make[3]: *** [daemon.lo] Error 1 make[3]: Leaving directory `/src/varnish-3.0.2/lib/libvarnishcompat' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/src/varnish-3.0.2/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/src/varnish-3.0.2' make: *** [all] Error 2 I think it is some kind of libtool error, but i dont know how to fix it my libtool version is libtool-1.5.22-7.el5_4 Thanks for any help Alex Co -------------- next part -------------- An HTML attachment was scrubbed... URL: From damon at huddler-inc.com Thu Jul 19 17:09:27 2012 From: damon at huddler-inc.com (Damon Snyder) Date: Thu, 19 Jul 2012 10:09:27 -0700 Subject: Best practice for not caching content requested by crawlers Message-ID: Hi Everyone, We have reason to believe that we have some amount of cache pollution from crawlers. We believe this to be the case after we attempted to determine the size of our hot data set. To determine the size of our hot dataset, we summed up the request sizes for all requests that had a hit rate > 1 over a nine hour period that included the peaks for the day. The sum of the sizes from this measurement came out to about 5GB. We have allocated 18GB (using malloc) to varnish and we are nuking at the rate of about 80 per second on a box whose hit rate is hovering around 70%. This suggests to me that we have a lot of data in the cache that is not actively being requested. Its not hot. The goal of this effort is to more accurately determine if we need to add additional varnish capacity (more memory). I'm using size your cacheas a guide and taking the advice there to try and reduce the n_lru_nuked rate, hopefully driving it to 0. As an experiment to both improve our hit rate, and ensure we are getting the most out of the memory we have allocated to varnish, I want to explore configuring varnish to not place into the cache requests that are coming from crawlers. I'm defining crawlers as requests with User-Agent headers containing strings like Googlebot, msnbot, etc. So my question is, what is the best practice for doing this? If a request comes from the crawler and its in the cache, I'm fine serving it from the cache. However if the request comes from the crawler and its not in the cache, I don't want varnish to cache it. Any suggestions would be appreciated. Thanks, Damon -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasse.karstensen at gmail.com Fri Jul 20 09:04:09 2012 From: lasse.karstensen at gmail.com (Lasse Karstensen) Date: Fri, 20 Jul 2012 11:04:09 +0200 Subject: Best practice for not caching content requested by crawlers In-Reply-To: References: Message-ID: <20120720090408.GB22334@yankee.samfundet.no> Damon Snyder: > We have reason to believe that we have some amount of cache pollution from > crawlers. We believe this to be the case after we attempted to determine > the size of our hot data set. [..] > So my question is, what is the best practice for doing this? If a request > comes from the crawler and its in the cache, I'm fine serving it from the > cache. However if the request comes from the crawler and its not in the > cache, I don't want varnish to cache it. I'm not clear on whether this is a good idea or not, but you can do it in VCL like this: sub vcl_miss { if (req.http.user-agent ~ "(?i)yandex|msnbot") { return(pass); } } You can probably use openddr/deviceatlas/$favorite_detectionengine to get better accuracy than this regex. -- Lasse Karstensen Varnish Software AS http://www.varnish-software.com/ From lasse.karstensen at gmail.com Fri Jul 20 10:44:54 2012 From: lasse.karstensen at gmail.com (Lasse Karstensen) Date: Fri, 20 Jul 2012 12:44:54 +0200 Subject: Best practice for not caching content requested by crawlers In-Reply-To: <20120720090408.GB22334@yankee.samfundet.no> References: <20120720090408.GB22334@yankee.samfundet.no> Message-ID: <20120720104452.GC22334@yankee.samfundet.no> Lasse Karstensen: [..] > sub vcl_miss { > if (req.http.user-agent ~ "(?i)yandex|msnbot") { > return(pass); > } > } > You can probably use openddr/deviceatlas/$favorite_detectionengine to get > better accuracy than this regex. I took at look at some access logs and updated devicedetect.vcl a bit so it has rudimentary bot detection: https://github.com/varnish/varnish-devicedetect/blob/master/devicedetect.vcl -- Lasse Karstensen Varnish Software AS http://www.varnish-software.com/ From tfheen at varnish-software.com Fri Jul 20 11:35:48 2012 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Fri, 20 Jul 2012 13:35:48 +0200 Subject: Error when compiling Varnish-3.0.2 on CentOS 5.8 In-Reply-To: References: Message-ID: <20120720113548.GC24339@err.no> ]] Tuan. Co Le Quoc > Hi, i got some errors when compiling Varnish 3.0.2 on my CentOS 5.8 [...] > I think it is some kind of libtool error, but i dont know how to fix it I'd recommend just building from a tarball, the libtool you have seems broken somehow. Alternatively, try libtoolize --copy --force and see if that helps. -- Tollef Fog Heen Technical lead, Varnish Software t: +47 21 98 92 64 From tuanclq at vng.com.vn Fri Jul 20 15:50:34 2012 From: tuanclq at vng.com.vn (Tuan. Co Le Quoc) Date: Fri, 20 Jul 2012 15:50:34 +0000 Subject: Error when compiling Varnish-3.0.2 on CentOS 5.8 In-Reply-To: <20120720113548.GC24339@err.no> References: , <20120720113548.GC24339@err.no> Message-ID: Hi Tollef I found the reason that was autogen.sh script . When i tried not to run that script before building it ( from tarball ) , i was successfully install Varnish . I think we should check that autogen.sh script Thanks ________________________________________ From: Tollef Fog Heen [tfheen at varnish-software.com] Sent: Friday, July 20, 2012 6:35 PM To: Tuan. Co Le Quoc Cc: varnish-misc at varnish-cache.org Subject: Re: Error when compiling Varnish-3.0.2 on CentOS 5.8 ]] Tuan. Co Le Quoc > Hi, i got some errors when compiling Varnish 3.0.2 on my CentOS 5.8 [...] > I think it is some kind of libtool error, but i dont know how to fix it I'd recommend just building from a tarball, the libtool you have seems broken somehow. Alternatively, try libtoolize --copy --force and see if that helps. -- Tollef Fog Heen Technical lead, Varnish Software t: +47 21 98 92 64 From abraham.sustaita at buscacorp.com Fri Jul 20 15:56:18 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Fri, 20 Jul 2012 08:56:18 -0700 Subject: How to trace if the request fails before get to varnish or at varnish? Message-ID: I have two varnish servers. If the request to the backend fails, varnish throws an error page, but the problem is that now Varnish is radomly failing. The connection expires and I see the error (at firefox) "The server is taking too much time to respond". Is there any way I can debug if the problem is with varnish or before? I have one switch, one firewall and one load balancer before varnish -------------- next part -------------- An HTML attachment was scrubbed... URL: From pprocacci at datapipe.com Fri Jul 20 18:00:37 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Fri, 20 Jul 2012 13:00:37 -0500 Subject: How to trace if the request fails before get to varnish or at varnish? In-Reply-To: References: Message-ID: <20120720180037.GC17983@nat.myhome> How would you debug it without using varnish? The method of debugging doens't change. - tcpdump - is the firewall max'd ? - resources on the machine - max fd's per process, etc., etc. ~Paul On Fri, Jul 20, 2012 at 08:56:18AM -0700, Abraham Cruz Sustaita wrote: > I have two varnish servers. If the request to the backend fails, > varnish throws an error page, but the problem is that now Varnish is > radomly failing. The connection expires and I see the error (at > firefox) "The server is taking too much time to respond". Is there any > way I can debug if the problem is with varnish or before? I have one > switch, one firewall and one load balancer before varnish > _______________________________________________ > 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 javi at lavandeira.net Mon Jul 23 02:57:40 2012 From: javi at lavandeira.net (Javi Lavandeira) Date: Mon, 23 Jul 2012 11:57:40 +0900 Subject: Child constantly crashes in Mac OS X Message-ID: Hello, I have Varnish 3.0.2 running on an OS X 10.7.3 system. The child process is crashing all the time (and with it, all the cache). Typical uptimes are 2-3 hours. The following output is the debug info I see in my /var/log/varnish.log. Any ideas/suggestions would be appreciated. Thanks in advance, -------------------------------------------------------------------------------------------------------------------- child (7681) Started Child (7681) said Child starts Child (7681) died signal=6 Child (7681) Panic message: Assert error in VCA_Prep(), cache_acceptor.c line 185: Condition(VTCP_Check(setsockopt(sp->fd, 0xffff, 0x1005, &tv_sndtimeo, sizeof tv_sndtimeo))) not true. errno = 22 (Invalid argument) thread = (cache-worker) ident = Darwin,11.3.0,x86_64,-smalloc,-smalloc,-hcritbit,poll Backtrace: 0x104319134: _sms_mtx+42b3a9c 0x1042f7c06: _sms_mtx+429256e 0x1043038f5: _sms_mtx+429e25d 0x10431a7e1: _sms_mtx+42b5149 0x10431b861: _sms_mtx+42b61c9 0x10431b545: _sms_mtx+42b5ead 0x7fff895318bf: _sms_mtx+7ffe894cc227 0x7fff89534b75: _sms_mtx+7ffe894cf4dd sp = 0x7fb8a38ce208 { fd = 9, id = 9, xid = 0, client = 187.164.53.188 50716, step = STP_FIRST, handling = deliver, restarts = 0, esi_level = 0 flags = bodystatus = 3 ws = 0x7fb8a38ce280 { id = "sess", {s,f,r,e} = {0x7fb8a38cee80,+24,0x0,+65536}, }, http[req] = { ws = 0x7fb8a38ce280[sess] "", "/lupita/trackback", "HTTP/1.1", "Host: www.veuanimal.org", "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3", "Accept-Encoding: gzip,deflate", "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7", "Keep-Alive: 115", "Connection: keep-alive", "Referer: http://www.veuanimal.org/lupita/", "Content-Type: application/x-www-form-urlencoded", "Content-Length: 131", "X-Forwarded-For: 176.9.7.205", }, worker = 0x109766b18 { ws = 0x109766d58 { id = "wrk", {s,f,r,e} = {0x109754a80,0x109754a80,0x0,+65536}, }, }, }, Child cleanup complete -------------------------------------------------------------------------------------------------------------------- -- Javi Lavandeira Twitter: @javilm Blog: http://www.lavandeira.net/blog/ Email and hosting: http://www.lavandeira.net/services/ From javi at lavandeira.net Mon Jul 23 03:00:05 2012 From: javi at lavandeira.net (Javi Lavandeira) Date: Mon, 23 Jul 2012 12:00:05 +0900 Subject: Child constantly crashes in Mac OS X In-Reply-To: References: Message-ID: I forgot to add the command line I use to launch it: /opt/local/sbin/varnishd -F -f /opt/local/etc/varnish/default.vcl -s malloc,3G -T 127.0.0.1:2000 -a 0.0.0.0:80 Regards, -- Javi Lavandeira Twitter: @javilm Blog: http://www.lavandeira.net/blog/ Email and hosting: http://www.lavandeira.net/services/ On Jul 23, 2012, at 11:57 AM, Javi Lavandeira wrote: > Hello, > > I have Varnish 3.0.2 running on an OS X 10.7.3 system. The child process is crashing all the time (and with it, all the cache). Typical uptimes are 2-3 hours. > > The following output is the debug info I see in my /var/log/varnish.log. Any ideas/suggestions would be appreciated. > > Thanks in advance, > > -------------------------------------------------------------------------------------------------------------------- > child (7681) Started > Child (7681) said Child starts > Child (7681) died signal=6 > Child (7681) Panic message: Assert error in VCA_Prep(), cache_acceptor.c line 185: > Condition(VTCP_Check(setsockopt(sp->fd, 0xffff, 0x1005, &tv_sndtimeo, sizeof tv_sndtimeo))) not true. > errno = 22 (Invalid argument) > thread = (cache-worker) > ident = Darwin,11.3.0,x86_64,-smalloc,-smalloc,-hcritbit,poll > Backtrace: > 0x104319134: _sms_mtx+42b3a9c > 0x1042f7c06: _sms_mtx+429256e > 0x1043038f5: _sms_mtx+429e25d > 0x10431a7e1: _sms_mtx+42b5149 > 0x10431b861: _sms_mtx+42b61c9 > 0x10431b545: _sms_mtx+42b5ead > 0x7fff895318bf: _sms_mtx+7ffe894cc227 > 0x7fff89534b75: _sms_mtx+7ffe894cf4dd > sp = 0x7fb8a38ce208 { > fd = 9, id = 9, xid = 0, > client = 187.164.53.188 50716, > step = STP_FIRST, > handling = deliver, > restarts = 0, esi_level = 0 > flags = > bodystatus = 3 > ws = 0x7fb8a38ce280 { > id = "sess", > {s,f,r,e} = {0x7fb8a38cee80,+24,0x0,+65536}, > }, > http[req] = { > ws = 0x7fb8a38ce280[sess] > "", > "/lupita/trackback", > "HTTP/1.1", > "Host: www.veuanimal.org", > "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)", > "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", > "Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3", > "Accept-Encoding: gzip,deflate", > "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7", > "Keep-Alive: 115", > "Connection: keep-alive", > "Referer: http://www.veuanimal.org/lupita/", > "Content-Type: application/x-www-form-urlencoded", > "Content-Length: 131", > "X-Forwarded-For: 176.9.7.205", > }, > worker = 0x109766b18 { > ws = 0x109766d58 { > id = "wrk", > {s,f,r,e} = {0x109754a80,0x109754a80,0x0,+65536}, > }, > }, > }, > > > Child cleanup complete > -------------------------------------------------------------------------------------------------------------------- > > -- > Javi Lavandeira > Twitter: @javilm > > Blog: http://www.lavandeira.net/blog/ > Email and hosting: http://www.lavandeira.net/services/ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gkaragiannidis at dolnet.gr Tue Jul 24 16:02:16 2012 From: gkaragiannidis at dolnet.gr (Karagiannidis Yiannis) Date: Tue, 24 Jul 2012 19:02:16 +0300 Subject: varnish multiple backends question about POST Message-ID: <036f01cd69b5$b54fdf00$1fef9d00$@dolnet.gr> Hi! I have setup one varnish server for multiple sites running on multiple backends. For example: Domains: domainA.com, domainB.com running on backend: backendC Domains: domain0.com, domain1.com running on backend: backend-10 Everything else goes to default backend DC I also have the following setup In sub vcl_recv { if (req.http.host ~ " domainA.com$") { unset req.http.cookie; set req.backend = backendC; return (lookup); } else if (req.http.host ~ "domainB.com$") { set req.backend = backendC; if ( req.request == "POST" ) { return(pass); } return (lookup); } else if (req.http.host ~ "domain0.com$") { set req.backend = backend-10; if ( req.request == "POST" ) { return(pass); } return (lookup); } else { # Use the default backend for all other requests set req.backend = default; return (lookup); } return (lookup); } My problem is that I have POST requests for both domainB.com and domain0.com and each time I have to use set req.backend = if ( req.request == "POST" ) { return(pass); in order to pass the request to the correct backend Is there a simpler way of handling post requests to different domains? ---------------------------------------------------------------------------- --------------------------------- And a second question if I use if (req.request != "GET" && req.request != "HEAD") { // Not cacheable by default if NOT GET,HEAD return(pass); } Then POST requests are passed to the default backend which, of course gives me an 404 error! Thanks in advance Yiannis -------------- next part -------------- An HTML attachment was scrubbed... URL: From gkaragiannidis at dolnet.gr Tue Jul 24 16:06:14 2012 From: gkaragiannidis at dolnet.gr (Karagiannidis Yiannis) Date: Tue, 24 Jul 2012 19:06:14 +0300 Subject: varnish multiple backends question about POST Message-ID: <037401cd69b6$42bbf130$c833d390$@dolnet.gr> Hi! I have setup one varnish server for multiple sites running on multiple backends. For example: Domains: domainA.com, domainB.com running on backend: backendC Domains: domain0.com, domain1.com running on backend: backend-10 Everything else goes to default backend DC I also have the following setup In sub vcl_recv { if (req.http.host ~ " domainA.com$") { ??????? unset req.http.cookie; ??????? set req.backend = backendC; ??????? return (lookup); ??????? } else if (req.http.host ~ "domainB.com$") { ??????? set req.backend = backendC; ??????? if ( req.request == "POST" ) { ??????????????????????????????? return(pass); ?????????????????????? } ??????? return (lookup); ??????? } else if (req.http.host ~ "domain0.com$") { ??????? set req.backend = backend-10; ??????? if ( req.request == "POST" ) { ??????????????????????????????? return(pass); ?????????????????????? } ??? ????return (lookup); ??????? } else { # Use the default backend for all other requests set req.backend = default; return (lookup); ??????? } ??????? return (lookup); } My problem is that I have POST requests for both domainB.com and domain0.com and each time I have to use set req.backend = if ( req.request == "POST" ) { ??????????????????????????????? return(pass); in order to pass the request to the correct backend Is there a simpler way of handling post requests to different domains? ---------------------------------------------------------------------------- --------------------------------- And a second question if I use if (req.request != "GET" && req.request != "HEAD") { ??????????????? // Not cacheable by default if NOT GET,HEAD ? ??????????????return(pass); ??????? } Then POST requests are passed to the default backend which, of course gives me an 404 error! Thanks in advance Yiannis From damon at huddler-inc.com Tue Jul 24 16:53:16 2012 From: damon at huddler-inc.com (Damon Snyder) Date: Tue, 24 Jul 2012 09:53:16 -0700 Subject: Best practice for not caching content requested by crawlers In-Reply-To: <20120720104452.GC22334@yankee.samfundet.no> References: <20120720090408.GB22334@yankee.samfundet.no> <20120720104452.GC22334@yankee.samfundet.no> Message-ID: Hi Lasse, Thanks! I forgot to mention this in the original email, but we are using varnish 2.1.5. Here is what I ended up doing: sub vcl_fetch { ... if (req.http.User-Agent ~ "(?i)(msn|google|bing|yandex|youdao|exa|mj12|omgili|flr-|ahrefs|blekko)bot" || req.http.User-Agent ~ "(?i)(magpie|mediapartners|sogou|baiduspider|nutch|yahoo.*slurp|genieo)") { set beresp.http.X-Bot-Bypass = "YES"; set beresp.ttl = 0s; return (pass); } ... } The X-Bot-Bypass was just for testing this configuration. With this filtering and a lower ttl for some of our other objects, our nuking is now at 0. The hit rate hasn't changed, but I think we need more granularity in our hit rate metrics. For example, perhaps we should be looking at non-bot hitrates. Thanks, Damon On Fri, Jul 20, 2012 at 3:44 AM, Lasse Karstensen < lasse.karstensen at gmail.com> wrote: > Lasse Karstensen: > [..] > > sub vcl_miss { > > if (req.http.user-agent ~ "(?i)yandex|msnbot") { > > return(pass); > > } > > } > > You can probably use openddr/deviceatlas/$favorite_detectionengine to get > > better accuracy than this regex. > > I took at look at some access logs and updated devicedetect.vcl a bit so > it has rudimentary bot detection: > > > https://github.com/varnish/varnish-devicedetect/blob/master/devicedetect.vcl > > > -- > Lasse Karstensen > Varnish Software AS > http://www.varnish-software.com/ > > _______________________________________________ > 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 lasse.karstensen at gmail.com Wed Jul 25 11:17:06 2012 From: lasse.karstensen at gmail.com (Lasse Karstensen) Date: Wed, 25 Jul 2012 13:17:06 +0200 Subject: Best practice for not caching content requested by crawlers In-Reply-To: References: <20120720090408.GB22334@yankee.samfundet.no> <20120720104452.GC22334@yankee.samfundet.no> Message-ID: <20120725111704.GA31786@yankee.samfundet.no> Damon Snyder: > Hi Lasse, > Thanks! I forgot to mention this in the original email, but we are using > varnish 2.1.5. Here is what I ended up doing: > sub vcl_fetch { > ... > if (req.http.User-Agent ~ > "(?i)(msn|google|bing|yandex|youdao|exa|mj12|omgili|flr-|ahrefs|blekko)bot" > || > req.http.User-Agent ~ > "(?i)(magpie|mediapartners|sogou|baiduspider|nutch|yahoo.*slurp|genieo)") { > set beresp.http.X-Bot-Bypass = "YES"; > set beresp.ttl = 0s; > return (pass); > } > ... > } Hi Damon. Just a quick note; doing this check in vcl_fetch will lead to serialisation of backend requests. This will hurt your HTTP response times, and since these bots take response time into account, probably also hurt your search engine visibility. I'd advice you to do this test in vcl_miss, and also not override beresp.ttl so that Varnish stores the hit_for_pass object for a while. If you need to set the debug header you can store it temporarily in req.http.x-bot-bypass and check/set resp.http.x-bot-bypass in vcl_deliver. -- Lasse Karstensen Varnish Software AS http://www.varnish-software.com/ From damon at huddler-inc.com Thu Jul 26 00:49:04 2012 From: damon at huddler-inc.com (Damon Snyder) Date: Wed, 25 Jul 2012 17:49:04 -0700 Subject: Best practice for not caching content requested by crawlers In-Reply-To: <20120725111704.GA31786@yankee.samfundet.no> References: <20120720090408.GB22334@yankee.samfundet.no> <20120720104452.GC22334@yankee.samfundet.no> <20120725111704.GA31786@yankee.samfundet.no> Message-ID: Hi Lasse, Correct me if I'm wrong, but vcl_miss is not available in varnish 2.1 (suggested here). Is there a varnish 2.x approach that would improve the response times? As an aside, our content is very broad-- there is a LOT of it. Its unlikely that serialization would be a concern for the bots unless multiple bots happend to hit content simultaneously that wasn't currently hot. That being said, we are exploring some form of caching for the bots. The rules/ttls should probably look different than our normal traffic. Thanks for the followup. I really appreciate it. Damon On Wed, Jul 25, 2012 at 4:17 AM, Lasse Karstensen < lasse.karstensen at gmail.com> wrote: > Damon Snyder: > > Hi Lasse, > > Thanks! I forgot to mention this in the original email, but we are using > > varnish 2.1.5. Here is what I ended up doing: > > sub vcl_fetch { > > ... > > if (req.http.User-Agent ~ > > > "(?i)(msn|google|bing|yandex|youdao|exa|mj12|omgili|flr-|ahrefs|blekko)bot" > > || > > req.http.User-Agent ~ > > > "(?i)(magpie|mediapartners|sogou|baiduspider|nutch|yahoo.*slurp|genieo)") { > > set beresp.http.X-Bot-Bypass = "YES"; > > set beresp.ttl = 0s; > > return (pass); > > } > > ... > > } > > Hi Damon. > > Just a quick note; doing this check in vcl_fetch will lead to serialisation > of backend requests. This will hurt your HTTP response times, and since > these > bots take response time into account, probably also hurt your search engine > visibility. > > I'd advice you to do this test in vcl_miss, and also not override > beresp.ttl > so that Varnish stores the hit_for_pass object for a while. > > If you need to set the debug header you can store it temporarily in > req.http.x-bot-bypass and check/set resp.http.x-bot-bypass in vcl_deliver. > > -- > Lasse Karstensen > Varnish Software AS > http://www.varnish-software.com/ > > _______________________________________________ > 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 connor.walls at skillpages.com Thu Jul 26 08:54:45 2012 From: connor.walls at skillpages.com (Connor Walls) Date: Thu, 26 Jul 2012 09:54:45 +0100 Subject: High CPU usage when using ban with HTTP PURGE Message-ID: Hi all, So, I've been having an issue with CPU usage recently. We run a cluster of 3 varnish boxes, running 3.0.2, serving content on a particular port, and accepting HTTP PURGE request on another (:82). This is used so whenever a user on the site changes something on their profile page, one of the backend servers will send a HTTP PURGE request to each box in the cluster, containing a regex in the header, which is then used to ban based on a particular URL - the relevant VCL is as follows: //to allow purging if (req.request == "PURGE") { if (!server.port == 82) { error 405 "Not Allowed."; return (lookup); } else { if(req.http.Purge-Regex) { ban("req.url ~ " + req.http.Purge-Regex); error 200 "Purged"; } else { error 200 "Not Purged"; } } } Now what we've been seeing is very high CPU usage with this functionality, which has been slowly growing over time with increased traffic on the website, and is now averaging above 70%, peaking at 100% at times and causing some user requests to fail. The CPU usage correlates very closely with timeout exceptions we get when making the HTTP PURGE requests. This became an issue yesterday to the point where we disabled the HTTP PURGE - CPU usage has now fallen from averaging > 70% to averaging around 8%, so clearly the purges are the issue. What I'm wondering is whether or not banning like this is going to be inherently heavy and I need to find a way to throttle the purge requests, or if I could rework the VCL so it will be less CPU heavy to process these requests? Will the CPU usage depend on what the actual regex is? Thanks, Connor Walls -------------- next part -------------- An HTML attachment was scrubbed... URL: From pom at dmsp.de Thu Jul 26 09:02:01 2012 From: pom at dmsp.de (Stefan Pommerening) Date: Thu, 26 Jul 2012 11:02:01 +0200 Subject: Varnish director stickyness expiry/timeout Message-ID: <50110789.80404@dmsp.de> Hello, For a web shop project I am using varnish for loadbalancing (and caching of course) several web servers. When it comes to session stickyness I am using the client.ip stickyness of the backend director. In vcl_recv: ## Use ClientIP for loadbalancer stickyness (and regard SSL offloading) if (req.http.X-Forwarded-Proto ~ "https") { set req.http.X-Client-Identity = req.http.X-Forwarded-For; if (req.http.X-Client-Identity ~ "\,") { set req.http.X-Client-Identity = regsuball(req.http.X-Client-Identity, "\s\,.*$", ""); } } else { set req.http.X-Client-Identity = client.ip; } set client.identity = req.http.X-Client-Identity; It seems that when a customer resturns after approximately 30 minutes the stickyness is lost and the customer needs to login again. Is there any timeout / expiry value I can change in order to prolong the director stickyness? What I've found is the sess_timeout value which is configured to be 5 seconds as a default value which doesn't fit our experience but still sounds somehow like the wrong place. Any advice would be great. ;-) Best regards, Stefan -- *Dipl.-Inform. Stefan Pommerening Informatik-B?ro: IT-Dienste & Projekte, Consulting & Coaching* An der Kappe 171 B, 13583 Berlin, Germany, Email: pom at dmsp.de Telephone(Office): +49-(0)30 / 375 84 888, Mobile: +49 - (0)179 / 394 80 72 Fax(Office): +49-(0)30 / 604 8594, http://www.dmsp.de Der Inhalt dieser E-Mail ist vertraulich und ausschlie?lich f?r den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe des Inhalts dieser E-Mail unzul?ssig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasse.karstensen at gmail.com Thu Jul 26 09:36:16 2012 From: lasse.karstensen at gmail.com (Lasse Karstensen) Date: Thu, 26 Jul 2012 11:36:16 +0200 Subject: High CPU usage when using ban with HTTP PURGE In-Reply-To: References: Message-ID: <20120726093611.GB31786@yankee.samfundet.no> Connor Walls: > So, I've been having an issue with CPU usage recently. We run a cluster of > 3 varnish boxes, running 3.0.2, serving content on a particular port, and > accepting HTTP PURGE request on another (:82). This is used so whenever a > user on the site changes something on their profile page, one of the > backend servers will send a HTTP PURGE request to each box in the cluster, > containing a regex in the header, which is then used to ban based on a > particular URL - the relevant VCL is as follows: [..] > Now what we've been seeing is very high CPU usage with this functionality, > which has been slowly growing over time with increased traffic on the > website, and is now averaging above 70%, peaking at 100% at times and > causing some user requests to fail. The CPU usage correlates very closely > with timeout exceptions we get when making the HTTP PURGE requests. This > became an issue yesterday to the point where we disabled the HTTP PURGE - > CPU usage has now fallen from averaging > 70% to averaging around 8%, so > clearly the purges are the issue. What I'm wondering is whether or not > banning like this is going to be inherently heavy and I need to find a way > to throttle the purge requests, or if I could rework the VCL so it will be > less CPU heavy to process these requests? Will the CPU usage depend on what > the actual regex is? There are two methods for cache invalidation in Varnish 3.0: Purges and bans. Bans are flexible and cool, and purges are less flexible but very fast. Use purges if you can. If you are using a high amount of bans, you should use what Kristian calls "Smart bans" in the Varnish Book: https://www.varnish-software.com/static/book/Cache_invalidation.html#smart-bans -- Lasse Karstensen Varnish Software AS http://www.varnish-software.com/ From lasse.karstensen at gmail.com Thu Jul 26 09:49:32 2012 From: lasse.karstensen at gmail.com (Lasse Karstensen) Date: Thu, 26 Jul 2012 11:49:32 +0200 Subject: Varnish director stickyness expiry/timeout In-Reply-To: <50110789.80404@dmsp.de> References: <50110789.80404@dmsp.de> Message-ID: <20120726094929.GC31786@yankee.samfundet.no> Stefan Pommerening: > For a web shop project I am using varnish for loadbalancing (and > caching of course) several web servers. > When it comes to session stickyness I am using the client.ip > stickyness of the backend director. [..] > It seems that when a customer resturns after approximately 30 > minutes the stickyness is lost and the customer needs to login > again. There is no state stored in the client director. client.identity is the only input. > Is there any timeout / expiry value I can change in order to prolong > the director stickyness? The hashing done by the random and client directors are not consistent, so if a backend of yours has gone away then all connections are reshuffled. > What I've found is the sess_timeout value which is configured to be > 5 seconds as a default value > which doesn't fit our experience but still sounds somehow like the > wrong place. sess_timeout isn't related to this. I would check that there are no such timeouts on any firewalls/ ssl-terminators in front of Varnish, or if your applications session cookies expires after 30 minutes. -- Lasse Karstensen Varnish Software AS http://www.varnish-software.com/ From rowan at jetboy.co.uk Thu Jul 26 13:59:38 2012 From: rowan at jetboy.co.uk (Rowan @ Jetboy) Date: Thu, 26 Jul 2012 14:59:38 +0100 Subject: HA Varnish with Heartbeat/Pacemaker Message-ID: <003601cd6b36$e576b320$b0641960$@co.uk> I thought it'd be worthwhile posting this to the list: http://serverfault.com/questions/410865/monitoring-varnish-with-heartbeat-an d-pacemaker It covers managing Varnish on a pair of high-availability Ubuntu servers with Heartbeat and Pacemaker. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brentgclarklist at gmail.com Fri Jul 27 09:36:21 2012 From: brentgclarklist at gmail.com (Brent Clark) Date: Fri, 27 Jul 2012 11:36:21 +0200 Subject: Config peer review Message-ID: <50126115.8090404@gmail.com> Guys I think I went a little overboard with the configuration of varnish. I would like to ask if someone could please take the time to peer review my configuration, and if possible, provide some feedback / pointers. My set up is, I have two webservers, and in front of it, varnish. On the webservers, I have Wordpress and Vbulletin sites. All in all, im very happy and impressed with Varnish, for everything just works (and im happy with my Cache hits vs Cache misses). But im asking for peer review, for I think, either I could have potentially missed something, or worse, im doing something wrong. Thanks, if you are prepared to help / review (If you ever in South Africa, look me up, I promise to buy you a beer. ). Kind Regards Brent Clark P.s. Sorry I should have added that im using varnish 2.1.3-8. --------------------------------------------------------------------------------------------------------------- # Define the list of backends (web servers). # Port 80 Backend Servers backend web1 { .host = "web01.mydomain.com"; .probe = { .url = "/fetch.html"; .interval = 5s; .timeout = 1s; .window = 5;.threshold = 3; }} backend web2 { .host = "web02.mydomain.com"; .probe = { .url = "/fetch.html"; .interval = 5s; .timeout = 1s; .window = 5;.threshold = 3; }} director default_director random { { .backend = web1; .weight = 1; } { .backend = web2; .weight = 1; } } acl purge { "localhost"; } # Respond to incoming requests. sub vcl_recv { if (req.request == "PURGE") { if (!client.ip ~ purge) { error 405 "Not allowed."; } return(lookup); } # Add a unique header containing the client address remove req.http.X-Forwarded-For; set req.http.X-Forwarded-For = client.ip; # Use anonymous, cached pages if all backends are down. if (!req.backend.healthy) { unset req.http.Cookie; } # Allow the backend to serve up stale content if it is responding slowly. set req.grace = 6h; # Caching of images. if ( req.url ~ "^.*/vb/images/.*$" || req.url ~ "^.*/wp-content/uploads/company/.*$" || req.url ~ "^.*/wp-content/uploads/.*$" || req.url ~ "^.*/photos/.*$" || req.url ~ "^.*/wp-content/themes/site/images/.*$" || req.url ~ "^/vb/images/.*$"){ unset req.http.Cookie; unset req.http.cookie; unset req.http.cache-control; unset req.http.pragma; unset req.http.expires; unset req.http.etag; unset req.http.X-Forwarded-For; return(lookup); } if (req.http.Accept-Encoding) { if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg)$") { remove req.http.Accept-Encoding; } else if (req.http.Accept-Encoding ~ "gzip") { set req.http.Accept-Encoding = "gzip"; } else if (req.http.Accept-Encoding ~ "deflate") { set req.http.Accept-Encoding = "deflate"; } else { remove req.http.Accept-Encoding; } } # Remove empty cookies. if (req.http.Cookie ~ "^\s*$") { unset req.http.Cookie; } # Always cache the following file types for all users. if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|css|js|xml|html|htm)(\?[a-z0-9]+)?$") { unset req.http.Cookie; unset req.http.cookie; unset req.http.cache-control; unset req.http.pragma; unset req.http.expires; unset req.http.etag; unset req.http.X-Forwarded-For; return(lookup); } # Defined twice, for I was not too sure, which regex is the one that will work the best. # if (req.url ~ "\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$") { if (req.url ~ "\.(png|gif|jpeg|jpg|ico|swf|css|js|xml|html|htm)$") { unset req.http.Cookie; unset req.http.cookie; unset req.http.cache-control; unset req.http.pragma; unset req.http.expires; unset req.http.etag; unset req.http.X-Forwarded-For; return(lookup); } } # Routine used to determine the cache key if storing/retrieving a cached page. sub vcl_hash { } # Code determining what to do when serving items from the Apache servers. sub vcl_fetch { # Caching of images. if ( req.url ~ "^.*/vb/images/.*$" || req.url ~ "^.*/wp-content/uploads/company/.*$" || req.url ~ "^.*/wp-content/uploads/.*$" || req.url ~ "^.*/photos/.*$" || req.url ~ "^.*/wp-content/themes/site/images/.*$" || req.url ~ "^/vb/images/.*$"){ unset beresp.http.set-cookie; set beresp.ttl = 24h; } # Don't allow static files to set cookies. if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|css|js|xml|html|htm)(\?[a-z0-9]+)?$") { unset beresp.http.set-cookie; set beresp.ttl = 24h; } # Strip cookies for static files and set a long cache expiry time. # if (req.url ~ "\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$") { if (req.url ~ "\.(png|gif|jpeg|jpg|ico|swf|css|js|xml|html|htm)$") { unset beresp.http.set-cookie; set beresp.ttl = 24h; } # Allow items to be stale if needed. if (beresp.status == 500) { set beresp.saintmode = 10s; restart; } set beresp.grace = 5m; } # In the event of an error, show friendlier messages. sub vcl_error { # Redirect to some other URL in the case of a homepage failure. #if (req.url ~ "^/?$") { # set obj.status = 302; # set obj.http.Location = "http://backup.example.com/"; #} # Otherwise redirect to the homepage, which will likely be in the cache. set obj.http.Content-Type = "text/html; charset=utf-8"; synthetic {" Page Unavailable

Page Unavailable

The page you requested is temporarily unavailable.

We're redirecting you to the homepage in 2 seconds.

(Error "} obj.status " " obj.response {")
"}; return (deliver); } From kervin at adevsoft.com Fri Jul 27 19:08:56 2012 From: kervin at adevsoft.com (Kervin L. Pierre) Date: Fri, 27 Jul 2012 19:08:56 +0000 Subject: 503 errors that are not backend timeouts? ( Wordpress ) Message-ID: I have a Wordpress install that gets occasional 503 errors on HTTP POST urls. And I need to find out what's causing these. Any help in tracking those down would be appreciated. Looking at my logs I can see that the 503 errors are not timeouts. I've got the backend timeouts set to 5 minutes and Varnish log shows the 503 errors being sent between 5 to 40 seconds into the script run. Can anyone tell me why Varnish would return a 503 error to the client besides after a backend timeout? ( HTTP GETs are not affected ) Section of the logs ( 503 occurs 39.8, 5.5 and 25 seconds into post script )... 16 SessionOpen c 91.x.x.x 50831 :80 16 RxURL c /wp-comments-post.php 16 TxStatus c 503 16 ReqEnd c 1117073234 1343394313.874103785 1343394353.676049232 0.000548363 39.801901102 0.000044346 26 RxURL c /wp-admin/admin-ajax.php 26 TxStatus c 503 26 ReqEnd c 1117393632 1343407124.979131699 1343407130.515117168 2.843032837 5.535950422 0.000035048 17 RxURL c /wp-admin/admin-ajax.php 17 TxStatus c 503 17 ReqEnd c 1117509532 1343412208.358498812 1343412233.383063078 2.842891693 25.024516821 0.000047445 Varnish config... backend default { .host = "10.x.x.x"; .port = "80"; .connect_timeout = 1m; .first_byte_timeout = 5m; .between_bytes_timeout = 5m; } sub vcl_recv { # Don't cache POST or PUT if (req.request == "POST" || req.request == "PUT") { return(pass); } set req.grace = 2m; if (req.http.Accept-Encoding) { #revisit this list if (req.url ~ "\.(gif|jpg|jpeg|swf|flv|mp3|mp4|pdf|ico|png|gz|tgz|bz2)(\?.*|)$") { remove req.http.Accept-Encoding; } elsif (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; } } # Remove cookies on static content if (req.url ~ "\.(gif|jpg|jpeg|swf|css|js|flv|mp3|mp4|pdf|ico|png)(\?.*|)$") { unset req.http.cookie; set req.url = regsub(req.url, "\?.*$", ""); } if (req.http.cookie) { return(pass); } } sub vcl_fetch { # Keep stale objects in memory for a minute or two set beresp.grace = 2m; if (beresp.ttl <= 0s || beresp.http.Set-Cookie || beresp.http.Vary == "*") { /* * Mark as "Hit-For-Pass" for the next 2 minutes */ set beresp.ttl = 120 s; return (hit_for_pass); } return (deliver); } sub vcl_error { # retry on some errors if (obj.status == 503) { if ( req.restarts < 3 ) { return (restart); } } } From zeeshan at infoshield.info Fri Jul 27 23:21:08 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Sat, 28 Jul 2012 01:21:08 +0200 Subject: Config for Joomla ? any working code Message-ID: Hi, Any working example for joomla with varnish ? I got Set Cookie on every request ..any hint ? Zee -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.carrillo at gmail.com Sat Jul 28 09:56:43 2012 From: daniel.carrillo at gmail.com (Daniel Carrillo) Date: Sat, 28 Jul 2012 11:56:43 +0200 Subject: 503 errors that are not backend timeouts? ( Wordpress ) In-Reply-To: References: Message-ID: 2012/7/27 Kervin L. Pierre : > I have a Wordpress install that gets occasional 503 errors on HTTP POST urls. And I need to find out what's causing these. Any help in tracking those down would be appreciated. > > Looking at my logs I can see that the 503 errors are not timeouts. I've got the backend timeouts set to 5 minutes and Varnish log shows the 503 errors being sent between 5 to 40 seconds into the script run. > > Can anyone tell me why Varnish would return a 503 error to the client besides after a backend timeout? ( HTTP GETs are not affected ) It sounds like this ticket: https://www.varnish-cache.org/trac/ticket/849 The workaround is "piping" POST request, and wait an implementation which buffers the request-body. Hope this helps. From kervin at adevsoft.com Sat Jul 28 19:05:41 2012 From: kervin at adevsoft.com (Kervin L. Pierre) Date: Sat, 28 Jul 2012 19:05:41 +0000 Subject: 503 errors that are not backend timeouts? ( Wordpress ) In-Reply-To: References: Message-ID: Hi Daniel, Thanks for the link. I actually ran into this ticket earlier put didn't read it in detail. And you're right, this is the issue I'm facing, thanks! It's disappointing to see the bug was closed as 'invalid' though. This seems to be a potentially very common bug. I'm not doing anything 'exotic' in this install. And the workaround seems to be "don't let varnish touch HTTP POSTs". But at any rate, I will try piping all POSTs as the you suggested. Best regards, Kervin Adevsoft Inc Business Software Development http://adevsoft.com/ > -----Original Message----- > From: Daniel Carrillo [mailto:daniel.carrillo at gmail.com] > Sent: Saturday, July 28, 2012 5:57 AM > To: Kervin L. Pierre > Cc: varnish-misc at varnish-cache.org > Subject: Re: 503 errors that are not backend timeouts? ( Wordpress ) > > 2012/7/27 Kervin L. Pierre : > > I have a Wordpress install that gets occasional 503 errors on HTTP > POST urls. And I need to find out what's causing these. Any help in > tracking those down would be appreciated. > > > > Looking at my logs I can see that the 503 errors are not timeouts. > I've got the backend timeouts set to 5 minutes and Varnish log shows > the 503 errors being sent between 5 to 40 seconds into the script run. > > > > Can anyone tell me why Varnish would return a 503 error to the client > > besides after a backend timeout? ( HTTP GETs are not affected ) > > It sounds like this ticket: > > https://www.varnish-cache.org/trac/ticket/849 > > The workaround is "piping" POST request, and wait an implementation > which buffers the request-body. > > Hope this helps. From gits.systems at gmail.com Sun Jul 29 05:22:57 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 08:22:57 +0300 Subject: Varnish Error - Fresh install. Message-ID: Hello, I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a restart command i recieve this error root at orient [/etc/varnish]# service varnish restart /etc/sysconfig/varnish: line 42: -p: command not found Stopping varnish HTTP accelerator: [ OK ] Starting varnish HTTP accelerator: [ OK ] root at orient [/etc/varnish]# to check /etc/sysconfig/varnish file DAEMON_OPTS="-a :80 \ -T localhost:6082 \ -f /etc/varnish/orient.sameerbook.com.vcl \ -u varnish -g varnish \ -s file,/var/lib/varnish/varnish_storage.bin,1G" -p thread_pools=8 \ -p thread_pool_max=5000 \ -p thread_pool_min=100 \ -p thread_pool_add_delay=2 \ -p sess_timeout=60" The -p command i just add it from this thread: http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ As i beleave these command to make the Varnish accept more connection quickly for servers who had a huge connection ( ex: my website had each day more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per second ). Hence i don't know if these commands are right or not as i see the error when i did restart for varnish. *Please let me know if there any other commands/feature for Varnish to handle huge connection like mine. Kind Regards, -J -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Sun Jul 29 06:01:53 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Sat, 28 Jul 2012 23:01:53 -0700 Subject: Varnish Error - Fresh install. In-Reply-To: References: Message-ID: You are missing one \ after -s file... El s?bado, 28 de julio de 2012, GITSS escribi?: > Hello, > > I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a > restart command i recieve this error > > root at orient [/etc/varnish]# service varnish restart > /etc/sysconfig/varnish: line 42: -p: command not found > Stopping varnish HTTP accelerator: [ OK ] > Starting varnish HTTP accelerator: [ OK ] > root at orient [/etc/varnish]# > > to check /etc/sysconfig/varnish file > > DAEMON_OPTS="-a :80 \ > -T localhost:6082 \ > -f /etc/varnish/orient.sameerbook.com.vcl \ > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,1G" > -p thread_pools=8 \ > -p thread_pool_max=5000 \ > -p thread_pool_min=100 \ > -p thread_pool_add_delay=2 \ > -p sess_timeout=60" > > > The -p command i just add it from this thread: > http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ > > As i beleave these command to make the Varnish accept more connection > quickly for servers who had a huge connection ( ex: my website had each day > more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per > second ). > > Hence i don't know if these commands are right or not as i see the error > when i did restart for varnish. > > *Please let me know if there any other commands/feature for Varnish to > handle huge connection like mine. > > Kind Regards, > -J > -- 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gits.systems at gmail.com Sun Jul 29 06:10:31 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:10:31 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: References: Message-ID: Thanks Abraham, long work day, is there any helpful rules for VCL can you share with us? am newbie with Varnish and looking to Speed my website for huge traffic, i have each day more than 30.000 and when the visitor comes to 2000 per second the web-server comes down, hence am looking for a good rules for VCL? Kind Regards, -J On Sun, Jul 29, 2012 at 9:01 AM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > You are missing one \ after -s file... > > El s?bado, 28 de julio de 2012, GITSS escribi?: > > Hello, >> >> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a >> restart command i recieve this error >> >> root at orient [/etc/varnish]# service varnish restart >> /etc/sysconfig/varnish: line 42: -p: command not found >> Stopping varnish HTTP accelerator: [ OK ] >> Starting varnish HTTP accelerator: [ OK ] >> root at orient [/etc/varnish]# >> >> to check /etc/sysconfig/varnish file >> >> DAEMON_OPTS="-a :80 \ >> -T localhost:6082 \ >> -f /etc/varnish/orient.sameerbook.com.vcl \ >> -u varnish -g varnish \ >> -s file,/var/lib/varnish/varnish_storage.bin,1G" >> -p thread_pools=8 \ >> -p thread_pool_max=5000 \ >> -p thread_pool_min=100 \ >> -p thread_pool_add_delay=2 \ >> -p sess_timeout=60" >> >> >> The -p command i just add it from this thread: >> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >> >> As i beleave these command to make the Varnish accept more connection >> quickly for servers who had a huge connection ( ex: my website had each day >> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >> second ). >> >> Hence i don't know if these commands are right or not as i see the error >> when i did restart for varnish. >> >> *Please let me know if there any other commands/feature for Varnish to >> handle huge connection like mine. >> >> Kind Regards, >> -J >> > > > -- > > 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. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gits.systems at gmail.com Sun Jul 29 06:13:11 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:13:11 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: References: Message-ID: Seems after i fix that issue by correcting the / the server get down! -bash: fork: Cannot allocate memory -bash-4.1# vzctl restart 101 -bash: fork: Cannot allocate memory -bash: fork: Cannot allocate memory Regards, -J On Sun, Jul 29, 2012 at 9:10 AM, GITSS wrote: > Thanks Abraham, long work day, is there any helpful rules for VCL can you > share with us? am newbie with Varnish and looking to Speed my website for > huge traffic, i have each day more than 30.000 and when the visitor comes > to 2000 per second the web-server comes down, hence am looking for a good > rules for VCL? > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:01 AM, Abraham Cruz Sustaita < > abraham.sustaita at buscacorp.com> wrote: > >> You are missing one \ after -s file... >> >> El s?bado, 28 de julio de 2012, GITSS escribi?: >> >> Hello, >>> >>> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a >>> restart command i recieve this error >>> >>> root at orient [/etc/varnish]# service varnish restart >>> /etc/sysconfig/varnish: line 42: -p: command not found >>> Stopping varnish HTTP accelerator: [ OK ] >>> Starting varnish HTTP accelerator: [ OK ] >>> root at orient [/etc/varnish]# >>> >>> to check /etc/sysconfig/varnish file >>> >>> DAEMON_OPTS="-a :80 \ >>> -T localhost:6082 \ >>> -f /etc/varnish/orient.sameerbook.com.vcl \ >>> -u varnish -g varnish \ >>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>> -p thread_pools=8 \ >>> -p thread_pool_max=5000 \ >>> -p thread_pool_min=100 \ >>> -p thread_pool_add_delay=2 \ >>> -p sess_timeout=60" >>> >>> >>> The -p command i just add it from this thread: >>> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >>> >>> As i beleave these command to make the Varnish accept more connection >>> quickly for servers who had a huge connection ( ex: my website had each day >>> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >>> second ). >>> >>> Hence i don't know if these commands are right or not as i see the error >>> when i did restart for varnish. >>> >>> *Please let me know if there any other commands/feature for Varnish to >>> handle huge connection like mine. >>> >>> Kind Regards, >>> -J >>> >> >> >> -- >> >> 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. >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Sun Jul 29 06:14:01 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Sat, 28 Jul 2012 23:14:01 -0700 Subject: Varnish Error - Fresh install. In-Reply-To: References: Message-ID: Im newbbie also. I have some questions on the mail list. Let me look for them El s?bado, 28 de julio de 2012, GITSS escribi?: > Thanks Abraham, long work day, is there any helpful rules for VCL can you > share with us? am newbie with Varnish and looking to Speed my website for > huge traffic, i have each day more than 30.000 and when the visitor comes > to 2000 per second the web-server comes down, hence am looking for a good > rules for VCL? > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:01 AM, Abraham Cruz Sustaita < > abraham.sustaita at buscacorp.com> wrote: > > You are missing one \ after -s file... > > El s?bado, 28 de julio de 2012, GITSS escribi?: > > Hello, > > I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a > restart command i recieve this error > > root at orient [/etc/varnish]# service varnish restart > /etc/sysconfig/varnish: line 42: -p: command not found > Stopping varnish HTTP accelerator: [ OK ] > Starting varnish HTTP accelerator: [ OK ] > root at orient [/etc/varnish]# > > to check /etc/sysconfig/varnish file > > DAEMON_OPTS="-a :80 \ > -T localhost:6082 \ > -f /etc/varnish/orient.sameerbook.com.vcl \ > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,1G" > -p thread_pools=8 \ > -p thread_pool_max=5000 \ > -p thread_pool_min=100 \ > -p thread_pool_add_delay=2 \ > -p sess_timeout=60" > > > The -p command i just add it from this thread: > http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ > > As i beleave these command to make the Varnish accept more connection > quickly for servers who had a huge connection ( ex: my website had each day > more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per > second ). > > Hence i don't know if these commands are right or not as i see the error > when i did restart for varnish. > > *Please let me know if there any other commands/feature for Varnish to > handle huge connection like mine. > > Kind Regards, > -J > > > > -- > > 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 > > -- 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gits.systems at gmail.com Sun Jul 29 06:18:45 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:18:45 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: References: Message-ID: It's fine bro, hope i can help you if you need any help. Hence here when i start Varnish i cannot allocate memory or do anything until i stop it! ------------------------------------------------------------------------------------------------------------- root at srv [/home/userwww]# /etc/init.d/varnish restart Stopping varnish HTTP accelerator: [ OK ] Starting varnish HTTP accelerator: [ OK ] root at srv [/home/userwww]# service httpd restart root at srv [/home/userwww]# w 09:15:41 up 2 days, 22:05, 1 user, load average: 0.01, 0.04, 0.06 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT j0 pts/0 46.248.192.217 07:56 4:02 1.34s 0.01s sshd: j0 [priv] root at srv [/home/userwww]# php -v Out of memory root at srv [/home/userwww]# /etc/init.d/varnish stop Stopping varnish HTTP accelerator: [ OK ] root at srv [/home/userwww]# service httpd restart root at srv [/home/userwww]# w 09:15:53 up 2 days, 22:05, 1 user, load average: 0.08, 0.05, 0.06 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT j0 pts/0 46.248.192.217 07:56 4:14 1.34s 0.01s sshd: j0 [priv] root at srv [/home/userwww]# php -v PHP 5.3.14 (cli) (built: Jul 25 2012 19:12:57) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator with the ionCube PHP Loader v4.0.12, Copyright (c) 2002-2011, by ionCube Ltd., and with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies root at srv [/home/userwww]# ------------------------------------------------------------------------------------------------------------- Is there anyone could assist me in this issue? Kind Regards, -J On Sun, Jul 29, 2012 at 9:14 AM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > Im newbbie also. I have some questions on the mail list. Let me look for > them > > > El s?bado, 28 de julio de 2012, GITSS escribi?: > >> Thanks Abraham, long work day, is there any helpful rules for VCL can you >> share with us? am newbie with Varnish and looking to Speed my website for >> huge traffic, i have each day more than 30.000 and when the visitor comes >> to 2000 per second the web-server comes down, hence am looking for a good >> rules for VCL? >> >> Kind Regards, >> -J >> >> >> >> On Sun, Jul 29, 2012 at 9:01 AM, Abraham Cruz Sustaita < >> abraham.sustaita at buscacorp.com> wrote: >> >> You are missing one \ after -s file... >> >> El s?bado, 28 de julio de 2012, GITSS escribi?: >> >> Hello, >> >> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a >> restart command i recieve this error >> >> root at orient [/etc/varnish]# service varnish restart >> /etc/sysconfig/varnish: line 42: -p: command not found >> Stopping varnish HTTP accelerator: [ OK ] >> Starting varnish HTTP accelerator: [ OK ] >> root at orient [/etc/varnish]# >> >> to check /etc/sysconfig/varnish file >> >> DAEMON_OPTS="-a :80 \ >> -T localhost:6082 \ >> -f /etc/varnish/orient.sameerbook.com.vcl \ >> -u varnish -g varnish \ >> -s file,/var/lib/varnish/varnish_storage.bin,1G" >> -p thread_pools=8 \ >> -p thread_pool_max=5000 \ >> -p thread_pool_min=100 \ >> -p thread_pool_add_delay=2 \ >> -p sess_timeout=60" >> >> >> The -p command i just add it from this thread: >> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >> >> As i beleave these command to make the Varnish accept more connection >> quickly for servers who had a huge connection ( ex: my website had each day >> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >> second ). >> >> Hence i don't know if these commands are right or not as i see the error >> when i did restart for varnish. >> >> *Please let me know if there any other commands/feature for Varnish to >> handle huge connection like mine. >> >> Kind Regards, >> -J >> >> >> >> -- >> >> 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 >> >> > > -- > > 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. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abraham.sustaita at buscacorp.com Sun Jul 29 06:20:56 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Sat, 28 Jul 2012 23:20:56 -0700 Subject: Varnish Error - Fresh install. In-Reply-To: References: Message-ID: I'm attaching my configuration file. May be it can help you. 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/7/28 GITSS > It's fine bro, hope i can help you if you need any help. > > Hence here when i start Varnish i cannot allocate memory or do anything > until i stop it! > > > ------------------------------------------------------------------------------------------------------------- > root at srv [/home/userwww]# /etc/init.d/varnish restart > Stopping varnish HTTP accelerator: [ OK ] > Starting varnish HTTP accelerator: [ OK ] > root at srv [/home/userwww]# service httpd restart > root at srv [/home/userwww]# w > 09:15:41 up 2 days, 22:05, 1 user, load average: 0.01, 0.04, 0.06 > USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT > j0 pts/0 46.248.192.217 07:56 4:02 1.34s 0.01s sshd: j0 > [priv] > root at srv [/home/userwww]# php -v > Out of memory > root at srv [/home/userwww]# /etc/init.d/varnish stop > Stopping varnish HTTP accelerator: [ OK ] > root at srv [/home/userwww]# service httpd restart > root at srv [/home/userwww]# w > 09:15:53 up 2 days, 22:05, 1 user, load average: 0.08, 0.05, 0.06 > USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT > j0 pts/0 46.248.192.217 07:56 4:14 1.34s 0.01s sshd: j0 > [priv] > root at srv [/home/userwww]# php -v > PHP 5.3.14 (cli) (built: Jul 25 2012 19:12:57) > Copyright (c) 1997-2012 The PHP Group > Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies > with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by > eAccelerator > with the ionCube PHP Loader v4.0.12, Copyright (c) 2002-2011, by > ionCube Ltd., and > with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend > Technologies > root at srv [/home/userwww]# > > ------------------------------------------------------------------------------------------------------------- > > Is there anyone could assist me in this issue? > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:14 AM, Abraham Cruz Sustaita < > abraham.sustaita at buscacorp.com> wrote: > >> Im newbbie also. I have some questions on the mail list. Let me look for >> them >> >> >> El s?bado, 28 de julio de 2012, GITSS escribi?: >> >>> Thanks Abraham, long work day, is there any helpful rules for VCL can >>> you share with us? am newbie with Varnish and looking to Speed my website >>> for huge traffic, i have each day more than 30.000 and when the visitor >>> comes to 2000 per second the web-server comes down, hence am looking for a >>> good rules for VCL? >>> >>> Kind Regards, >>> -J >>> >>> >>> >>> On Sun, Jul 29, 2012 at 9:01 AM, Abraham Cruz Sustaita < >>> abraham.sustaita at buscacorp.com> wrote: >>> >>> You are missing one \ after -s file... >>> >>> El s?bado, 28 de julio de 2012, GITSS escribi?: >>> >>> Hello, >>> >>> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a >>> restart command i recieve this error >>> >>> root at orient [/etc/varnish]# service varnish restart >>> /etc/sysconfig/varnish: line 42: -p: command not found >>> Stopping varnish HTTP accelerator: [ OK ] >>> Starting varnish HTTP accelerator: [ OK ] >>> root at orient [/etc/varnish]# >>> >>> to check /etc/sysconfig/varnish file >>> >>> DAEMON_OPTS="-a :80 \ >>> -T localhost:6082 \ >>> -f /etc/varnish/orient.sameerbook.com.vcl \ >>> -u varnish -g varnish \ >>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>> -p thread_pools=8 \ >>> -p thread_pool_max=5000 \ >>> -p thread_pool_min=100 \ >>> -p thread_pool_add_delay=2 \ >>> -p sess_timeout=60" >>> >>> >>> The -p command i just add it from this thread: >>> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >>> >>> As i beleave these command to make the Varnish accept more connection >>> quickly for servers who had a huge connection ( ex: my website had each day >>> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >>> second ). >>> >>> Hence i don't know if these commands are right or not as i see the error >>> when i did restart for varnish. >>> >>> *Please let me know if there any other commands/feature for Varnish to >>> handle huge connection like mine. >>> >>> Kind Regards, >>> -J >>> >>> >>> >>> -- >>> >>> 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 >>> >>> >> >> -- >> >> 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. >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: varnish.conf Type: application/octet-stream Size: 3608 bytes Desc: not available URL: From gits.systems at gmail.com Sun Jul 29 06:25:26 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:25:26 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: References: Message-ID: Thanks Abraham, i really appropriated it brother. Seems when i add these configuration to the config it's get the server offline immediately! -p thread_pools=8 \ -p thread_pool_max=5000 \ -p thread_pool_min=100 \ -p thread_pool_add_delay=2 \ -p sess_timeout=60" Kind Regards, -J On Sun, Jul 29, 2012 at 9:20 AM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > I'm attaching my configuration file. May be it can help you. > > > 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/7/28 GITSS > >> It's fine bro, hope i can help you if you need any help. >> >> Hence here when i start Varnish i cannot allocate memory or do anything >> until i stop it! >> >> >> ------------------------------------------------------------------------------------------------------------- >> root at srv [/home/userwww]# /etc/init.d/varnish restart >> Stopping varnish HTTP accelerator: [ OK ] >> Starting varnish HTTP accelerator: [ OK ] >> root at srv [/home/userwww]# service httpd restart >> root at srv [/home/userwww]# w >> 09:15:41 up 2 days, 22:05, 1 user, load average: 0.01, 0.04, 0.06 >> USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT >> j0 pts/0 46.248.192.217 07:56 4:02 1.34s 0.01s sshd: j0 >> [priv] >> root at srv [/home/userwww]# php -v >> Out of memory >> root at srv [/home/userwww]# /etc/init.d/varnish stop >> Stopping varnish HTTP accelerator: [ OK ] >> root at srv [/home/userwww]# service httpd restart >> root at srv [/home/userwww]# w >> 09:15:53 up 2 days, 22:05, 1 user, load average: 0.08, 0.05, 0.06 >> USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT >> j0 pts/0 46.248.192.217 07:56 4:14 1.34s 0.01s sshd: j0 >> [priv] >> root at srv [/home/userwww]# php -v >> PHP 5.3.14 (cli) (built: Jul 25 2012 19:12:57) >> Copyright (c) 1997-2012 The PHP Group >> Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies >> with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by >> eAccelerator >> with the ionCube PHP Loader v4.0.12, Copyright (c) 2002-2011, by >> ionCube Ltd., and >> with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend >> Technologies >> root at srv [/home/userwww]# >> >> ------------------------------------------------------------------------------------------------------------- >> >> Is there anyone could assist me in this issue? >> >> Kind Regards, >> -J >> >> >> >> On Sun, Jul 29, 2012 at 9:14 AM, Abraham Cruz Sustaita < >> abraham.sustaita at buscacorp.com> wrote: >> >>> Im newbbie also. I have some questions on the mail list. Let me look for >>> them >>> >>> >>> El s?bado, 28 de julio de 2012, GITSS escribi?: >>> >>>> Thanks Abraham, long work day, is there any helpful rules for VCL can >>>> you share with us? am newbie with Varnish and looking to Speed my website >>>> for huge traffic, i have each day more than 30.000 and when the visitor >>>> comes to 2000 per second the web-server comes down, hence am looking for a >>>> good rules for VCL? >>>> >>>> Kind Regards, >>>> -J >>>> >>>> >>>> >>>> On Sun, Jul 29, 2012 at 9:01 AM, Abraham Cruz Sustaita < >>>> abraham.sustaita at buscacorp.com> wrote: >>>> >>>> You are missing one \ after -s file... >>>> >>>> El s?bado, 28 de julio de 2012, GITSS escribi?: >>>> >>>> Hello, >>>> >>>> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a >>>> restart command i recieve this error >>>> >>>> root at orient [/etc/varnish]# service varnish restart >>>> /etc/sysconfig/varnish: line 42: -p: command not found >>>> Stopping varnish HTTP accelerator: [ OK ] >>>> Starting varnish HTTP accelerator: [ OK ] >>>> root at orient [/etc/varnish]# >>>> >>>> to check /etc/sysconfig/varnish file >>>> >>>> DAEMON_OPTS="-a :80 \ >>>> -T localhost:6082 \ >>>> -f /etc/varnish/orient.sameerbook.com.vcl \ >>>> -u varnish -g varnish \ >>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>> -p thread_pools=8 \ >>>> -p thread_pool_max=5000 \ >>>> -p thread_pool_min=100 \ >>>> -p thread_pool_add_delay=2 \ >>>> -p sess_timeout=60" >>>> >>>> >>>> The -p command i just add it from this thread: >>>> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >>>> >>>> As i beleave these command to make the Varnish accept more connection >>>> quickly for servers who had a huge connection ( ex: my website had each day >>>> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >>>> second ). >>>> >>>> Hence i don't know if these commands are right or not as i see the >>>> error when i did restart for varnish. >>>> >>>> *Please let me know if there any other commands/feature for Varnish to >>>> handle huge connection like mine. >>>> >>>> Kind Regards, >>>> -J >>>> >>>> >>>> >>>> -- >>>> >>>> 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 >>>> >>>> >>> >>> -- >>> >>> 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. >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gits.systems at gmail.com Sun Jul 29 06:28:20 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:28:20 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: <9D269E86-8FA6-42C5-9048-3C8C7ED626A9@lavandeira.net> References: <9D269E86-8FA6-42C5-9048-3C8C7ED626A9@lavandeira.net> Message-ID: Should i use Abraham config for huge traffic or i upgrade that 1G to 4 G? or just remove it Javi? Kind Regards, -J On Sun, Jul 29, 2012 at 8:41 AM, Javi Lavandeira wrote: > Remove the quotation mark after "1G". > > -- > Javi Lavandeira > > *Twitter*: @javilm > *Blog*: http://www.lavandeira.net/blog > > On 2012/07/29, at 14:22, GITSS wrote: > > Hello, > > I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a > restart command i recieve this error > > root at orient [/etc/varnish]# service varnish restart > /etc/sysconfig/varnish: line 42: -p: command not found > Stopping varnish HTTP accelerator: [ OK ] > Starting varnish HTTP accelerator: [ OK ] > root at orient [/etc/varnish]# > > to check /etc/sysconfig/varnish file > > DAEMON_OPTS="-a :80 \ > -T localhost:6082 \ > -f /etc/varnish/orient.sameerbook.com.vcl \ > -u varnish -g varnish \ > -s file,/var/lib/varnish/varnish_storage.bin,1G" > -p thread_pools=8 \ > -p thread_pool_max=5000 \ > -p thread_pool_min=100 \ > -p thread_pool_add_delay=2 \ > -p sess_timeout=60" > > > The -p command i just add it from this thread: > http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ > > As i beleave these command to make the Varnish accept more connection > quickly for servers who had a huge connection ( ex: my website had each day > more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per > second ). > > Hence i don't know if these commands are right or not as i see the error > when i did restart for varnish. > > *Please let me know if there any other commands/feature for Varnish to > handle huge connection like mine. > > Kind Regards, > -J > > _______________________________________________ > 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 gits.systems at gmail.com Sun Jul 29 06:33:22 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:33:22 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: References: <9D269E86-8FA6-42C5-9048-3C8C7ED626A9@lavandeira.net> Message-ID: It's now work fine Javi, thanks for your recommendation.... hence if there any good config for huge traffic i can use for my website? as i said above, the web-server is getting down when the visitor reach 2000 per second. Kind Regards, -J On Sun, Jul 29, 2012 at 9:28 AM, GITSS wrote: > Should i use Abraham config for huge traffic or i upgrade that 1G to 4 G? > or just remove it Javi? > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 8:41 AM, Javi Lavandeira wrote: > >> Remove the quotation mark after "1G". >> >> -- >> Javi Lavandeira >> >> *Twitter*: @javilm >> *Blog*: http://www.lavandeira.net/blog >> >> On 2012/07/29, at 14:22, GITSS wrote: >> >> Hello, >> >> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a >> restart command i recieve this error >> >> root at orient [/etc/varnish]# service varnish restart >> /etc/sysconfig/varnish: line 42: -p: command not found >> Stopping varnish HTTP accelerator: [ OK ] >> Starting varnish HTTP accelerator: [ OK ] >> root at orient [/etc/varnish]# >> >> to check /etc/sysconfig/varnish file >> >> DAEMON_OPTS="-a :80 \ >> -T localhost:6082 \ >> -f /etc/varnish/orient.sameerbook.com.vcl \ >> -u varnish -g varnish \ >> -s file,/var/lib/varnish/varnish_storage.bin,1G" >> -p thread_pools=8 \ >> -p thread_pool_max=5000 \ >> -p thread_pool_min=100 \ >> -p thread_pool_add_delay=2 \ >> -p sess_timeout=60" >> >> >> The -p command i just add it from this thread: >> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >> >> As i beleave these command to make the Varnish accept more connection >> quickly for servers who had a huge connection ( ex: my website had each day >> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >> second ). >> >> Hence i don't know if these commands are right or not as i see the error >> when i did restart for varnish. >> >> *Please let me know if there any other commands/feature for Varnish to >> handle huge connection like mine. >> >> Kind Regards, >> -J >> >> _______________________________________________ >> 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 Sun Jul 29 06:40:28 2012 From: abraham.sustaita at buscacorp.com (Abraham Cruz Sustaita) Date: Sat, 28 Jul 2012 23:40:28 -0700 Subject: Varnish Error - Fresh install. In-Reply-To: References: <9D269E86-8FA6-42C5-9048-3C8C7ED626A9@lavandeira.net> Message-ID: Are u using 4G or 1G? El s?bado, 28 de julio de 2012, GITSS escribi?: > It's now work fine Javi, thanks for your recommendation.... hence if there > any good config for huge traffic i can use for my website? as i said above, > the web-server is getting down when the visitor reach 2000 per second. > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:28 AM, GITSS > > wrote: > >> Should i use Abraham config for huge traffic or i upgrade that 1G to 4 G? >> or just remove it Javi? >> >> Kind Regards, >> -J >> >> >> >> On Sun, Jul 29, 2012 at 8:41 AM, Javi Lavandeira >> > wrote: >> >>> Remove the quotation mark after "1G". >>> >>> -- >>> Javi Lavandeira >>> >>> *Twitter*: @javilm >>> *Blog*: http://www.lavandeira.net/blog >>> >>> On 2012/07/29, at 14:22, GITSS > >>> wrote: >>> >>> Hello, >>> >>> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a >>> restart command i recieve this error >>> >>> root at orient [/etc/varnish]# service varnish restart >>> /etc/sysconfig/varnish: line 42: -p: command not found >>> Stopping varnish HTTP accelerator: [ OK ] >>> Starting varnish HTTP accelerator: [ OK ] >>> root at orient [/etc/varnish]# >>> >>> to check /etc/sysconfig/varnish file >>> >>> DAEMON_OPTS="-a :80 \ >>> -T localhost:6082 \ >>> -f /etc/varnish/orient.sameerbook.com.vcl \ >>> -u varnish -g varnish \ >>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>> -p thread_pools=8 \ >>> -p thread_pool_max=5000 \ >>> -p thread_pool_min=100 \ >>> -p thread_pool_add_delay=2 \ >>> -p sess_timeout=60" >>> >>> >>> The -p command i just add it from this thread: >>> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >>> >>> As i beleave these command to make the Varnish accept more connection >>> quickly for servers who had a huge connection ( ex: my website had each day >>> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >>> second ). >>> >>> Hence i don't know if these commands are right or not as i see the error >>> when i did restart for varnish. >>> >>> *Please let me know if there any other commands/feature for Varnish to >>> handle huge connection like mine. >>> >>> Kind Regards, >>> -J >>> >>> _______________________________________________ >>> varnish-misc mailing list >>> varnish-misc at varnish-cache.org >> 'varnish-misc at varnish-cache.org');> >>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>> >>> >> > -- 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gits.systems at gmail.com Sun Jul 29 06:42:20 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:42:20 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: References: <9D269E86-8FA6-42C5-9048-3C8C7ED626A9@lavandeira.net> Message-ID: The VPS Had 8 GB, but seems when i start it it's make the server down, even your config it's wont make Vanish start! Kind Regards, -J On Sun, Jul 29, 2012 at 9:40 AM, Abraham Cruz Sustaita < abraham.sustaita at buscacorp.com> wrote: > Are u using 4G or 1G? > > > El s?bado, 28 de julio de 2012, GITSS escribi?: > >> It's now work fine Javi, thanks for your recommendation.... hence if >> there any good config for huge traffic i can use for my website? as i said >> above, the web-server is getting down when the visitor reach 2000 per >> second. >> >> Kind Regards, >> -J >> >> >> >> On Sun, Jul 29, 2012 at 9:28 AM, GITSS wrote: >> >>> Should i use Abraham config for huge traffic or i upgrade that 1G to 4 >>> G? or just remove it Javi? >>> >>> Kind Regards, >>> -J >>> >>> >>> >>> On Sun, Jul 29, 2012 at 8:41 AM, Javi Lavandeira wrote: >>> >>>> Remove the quotation mark after "1G". >>>> >>>> -- >>>> Javi Lavandeira >>>> >>>> *Twitter*: @javilm >>>> *Blog*: http://www.lavandeira.net/blog >>>> >>>> On 2012/07/29, at 14:22, GITSS wrote: >>>> >>>> Hello, >>>> >>>> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a >>>> restart command i recieve this error >>>> >>>> root at orient [/etc/varnish]# service varnish restart >>>> /etc/sysconfig/varnish: line 42: -p: command not found >>>> Stopping varnish HTTP accelerator: [ OK ] >>>> Starting varnish HTTP accelerator: [ OK ] >>>> root at orient [/etc/varnish]# >>>> >>>> to check /etc/sysconfig/varnish file >>>> >>>> DAEMON_OPTS="-a :80 \ >>>> -T localhost:6082 \ >>>> -f /etc/varnish/orient.sameerbook.com.vcl \ >>>> -u varnish -g varnish \ >>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>> -p thread_pools=8 \ >>>> -p thread_pool_max=5000 \ >>>> -p thread_pool_min=100 \ >>>> -p thread_pool_add_delay=2 \ >>>> -p sess_timeout=60" >>>> >>>> >>>> The -p command i just add it from this thread: >>>> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >>>> >>>> As i beleave these command to make the Varnish accept more connection >>>> quickly for servers who had a huge connection ( ex: my website had each day >>>> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >>>> second ). >>>> >>>> Hence i don't know if these commands are right or not as i see the >>>> error when i did restart for varnish. >>>> >>>> *Please let me know if there any other commands/feature for Varnish to >>>> handle huge connection like mine. >>>> >>>> Kind Regards, >>>> -J >>>> >>>> _______________________________________________ >>>> varnish-misc mailing list >>>> varnish-misc at varnish-cache.org >>>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>> >>>> >>> >> > > -- > > 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. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gits.systems at gmail.com Sun Jul 29 06:48:09 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:48:09 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: References: <9D269E86-8FA6-42C5-9048-3C8C7ED626A9@lavandeira.net> Message-ID: Here the log/messages Jul 29 09:36:54 servername varnishd[1517]: child (1518) Started Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Closed fds: 4 5 6 7 10 11 13 14 Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Child starts Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said managed to mmap 528803983360 bytes of 528803983360 Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Ready Jul 29 09:37:13 servername varnishd[1517]: Manager got SIGINT Kind Regards, -J On Sun, Jul 29, 2012 at 9:42 AM, GITSS wrote: > The VPS Had 8 GB, but seems when i start it it's make the server down, > even your config it's wont make Vanish start! > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:40 AM, Abraham Cruz Sustaita < > abraham.sustaita at buscacorp.com> wrote: > >> Are u using 4G or 1G? >> >> >> El s?bado, 28 de julio de 2012, GITSS escribi?: >> >>> It's now work fine Javi, thanks for your recommendation.... hence if >>> there any good config for huge traffic i can use for my website? as i said >>> above, the web-server is getting down when the visitor reach 2000 per >>> second. >>> >>> Kind Regards, >>> -J >>> >>> >>> >>> On Sun, Jul 29, 2012 at 9:28 AM, GITSS wrote: >>> >>>> Should i use Abraham config for huge traffic or i upgrade that 1G to 4 >>>> G? or just remove it Javi? >>>> >>>> Kind Regards, >>>> -J >>>> >>>> >>>> >>>> On Sun, Jul 29, 2012 at 8:41 AM, Javi Lavandeira wrote: >>>> >>>>> Remove the quotation mark after "1G". >>>>> >>>>> -- >>>>> Javi Lavandeira >>>>> >>>>> *Twitter*: @javilm >>>>> *Blog*: http://www.lavandeira.net/blog >>>>> >>>>> On 2012/07/29, at 14:22, GITSS wrote: >>>>> >>>>> Hello, >>>>> >>>>> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run >>>>> a restart command i recieve this error >>>>> >>>>> root at orient [/etc/varnish]# service varnish restart >>>>> /etc/sysconfig/varnish: line 42: -p: command not found >>>>> Stopping varnish HTTP accelerator: [ OK ] >>>>> Starting varnish HTTP accelerator: [ OK ] >>>>> root at orient [/etc/varnish]# >>>>> >>>>> to check /etc/sysconfig/varnish file >>>>> >>>>> DAEMON_OPTS="-a :80 \ >>>>> -T localhost:6082 \ >>>>> -f /etc/varnish/orient.sameerbook.com.vcl \ >>>>> -u varnish -g varnish \ >>>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>>> -p thread_pools=8 \ >>>>> -p thread_pool_max=5000 \ >>>>> -p thread_pool_min=100 \ >>>>> -p thread_pool_add_delay=2 \ >>>>> -p sess_timeout=60" >>>>> >>>>> >>>>> The -p command i just add it from this thread: >>>>> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >>>>> >>>>> As i beleave these command to make the Varnish accept more connection >>>>> quickly for servers who had a huge connection ( ex: my website had each day >>>>> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >>>>> second ). >>>>> >>>>> Hence i don't know if these commands are right or not as i see the >>>>> error when i did restart for varnish. >>>>> >>>>> *Please let me know if there any other commands/feature for Varnish to >>>>> handle huge connection like mine. >>>>> >>>>> Kind Regards, >>>>> -J >>>>> >>>>> _______________________________________________ >>>>> varnish-misc mailing list >>>>> varnish-misc at varnish-cache.org >>>>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>>> >>>>> >>>> >>> >> >> -- >> >> 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. >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.tailor at gmail.com Sun Jul 29 06:57:07 2012 From: nick.tailor at gmail.com (Nick Tailor) Date: Sat, 28 Jul 2012 23:57:07 -0700 Subject: Varnish Error - Fresh install. In-Reply-To: References: <9D269E86-8FA6-42C5-9048-3C8C7ED626A9@lavandeira.net> Message-ID: <9676B5A1-66D0-42E0-9183-92C1F6278B2B@gmail.com> Yeah u have to configure it for it to start :) Sent from my iPhone On Jul 28, 2012, at 11:48 PM, GITSS wrote: > Here the log/messages > > Jul 29 09:36:54 servername varnishd[1517]: child (1518) Started > Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Closed fds: 4 5 6 7 10 11 13 14 > Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Child starts > Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said managed to mmap 528803983360 bytes of 528803983360 > Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Ready > Jul 29 09:37:13 servername varnishd[1517]: Manager got SIGINT > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:42 AM, GITSS wrote: > The VPS Had 8 GB, but seems when i start it it's make the server down, even your config it's wont make Vanish start! > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:40 AM, Abraham Cruz Sustaita wrote: > Are u using 4G or 1G? > > > El s?bado, 28 de julio de 2012, GITSS escribi?: > It's now work fine Javi, thanks for your recommendation.... hence if there any good config for huge traffic i can use for my website? as i said above, the web-server is getting down when the visitor reach 2000 per second. > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:28 AM, GITSS wrote: > Should i use Abraham config for huge traffic or i upgrade that 1G to 4 G? or just remove it Javi? > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 8:41 AM, Javi Lavandeira wrote: > Remove the quotation mark after "1G". > > -- > Javi Lavandeira > > Twitter: @javilm > Blog: http://www.lavandeira.net/blog > > On 2012/07/29, at 14:22, GITSS wrote: > >> Hello, >> >> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run a restart command i recieve this error >> >> root at orient [/etc/varnish]# service varnish restart >> /etc/sysconfig/varnish: line 42: -p: command not found >> Stopping varnish HTTP accelerator: [ OK ] >> Starting varnish HTTP accelerator: [ OK ] >> root at orient [/etc/varnish]# >> >> to check /etc/sysconfig/varnish file >> >> DAEMON_OPTS="-a :80 \ >> -T localhost:6082 \ >> -f /etc/varnish/orient.sameerbook.com.vcl \ >> -u varnish -g varnish \ >> -s file,/var/lib/varnish/varnish_storage.bin,1G" >> -p thread_pools=8 \ >> -p thread_pool_max=5000 \ >> -p thread_pool_min=100 \ >> -p thread_pool_add_delay=2 \ >> -p sess_timeout=60" >> >> >> The -p command i just add it from this thread: http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >> >> As i beleave these command to make the Varnish accept more connection quickly for servers who had a huge connection ( ex: my website had each day more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per second ). >> >> Hence i don't know if these commands are right or not as i see the error when i did restart for varnish. >> >> *Please let me know if there any other commands/feature for Varnish to handle huge connection like mine. >> >> Kind Regards, >> -J >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > > > > > -- > > > 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. > > > > _______________________________________________ > 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 gits.systems at gmail.com Sun Jul 29 06:58:57 2012 From: gits.systems at gmail.com (GITSS) Date: Sun, 29 Jul 2012 09:58:57 +0300 Subject: Varnish Error - Fresh install. In-Reply-To: <9676B5A1-66D0-42E0-9183-92C1F6278B2B@gmail.com> References: <9D269E86-8FA6-42C5-9048-3C8C7ED626A9@lavandeira.net> <9676B5A1-66D0-42E0-9183-92C1F6278B2B@gmail.com> Message-ID: am trying :- / Kind Regards, -J On Sun, Jul 29, 2012 at 9:57 AM, Nick Tailor wrote: > Yeah u have to configure it for it to start :) > > Sent from my iPhone > > On Jul 28, 2012, at 11:48 PM, GITSS wrote: > > Here the log/messages > > Jul 29 09:36:54 servername varnishd[1517]: child (1518) Started > Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Closed fds: 4 > 5 6 7 10 11 13 14 > Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Child starts > Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said managed to > mmap 528803983360 bytes of 528803983360 > Jul 29 09:36:54 servername varnishd[1517]: Child (1518) said Ready > Jul 29 09:37:13 servername varnishd[1517]: Manager got SIGINT > > Kind Regards, > -J > > > > On Sun, Jul 29, 2012 at 9:42 AM, GITSS wrote: > >> The VPS Had 8 GB, but seems when i start it it's make the server down, >> even your config it's wont make Vanish start! >> >> Kind Regards, >> -J >> >> >> >> On Sun, Jul 29, 2012 at 9:40 AM, Abraham Cruz Sustaita < >> abraham.sustaita at buscacorp.com> wrote: >> >>> Are u using 4G or 1G? >>> >>> >>> El s?bado, 28 de julio de 2012, GITSS escribi?: >>> >>>> It's now work fine Javi, thanks for your recommendation.... hence if >>>> there any good config for huge traffic i can use for my website? as i said >>>> above, the web-server is getting down when the visitor reach 2000 per >>>> second. >>>> >>>> Kind Regards, >>>> -J >>>> >>>> >>>> >>>> On Sun, Jul 29, 2012 at 9:28 AM, GITSS wrote: >>>> >>>>> Should i use Abraham config for huge traffic or i upgrade that 1G to 4 >>>>> G? or just remove it Javi? >>>>> >>>>> Kind Regards, >>>>> -J >>>>> >>>>> >>>>> >>>>> On Sun, Jul 29, 2012 at 8:41 AM, Javi Lavandeira wrote: >>>>> >>>>>> Remove the quotation mark after "1G". >>>>>> >>>>>> -- >>>>>> Javi Lavandeira >>>>>> >>>>>> *Twitter*: @javilm >>>>>> *Blog*: http://www.lavandeira.net/blog >>>>>> >>>>>> On 2012/07/29, at 14:22, GITSS wrote: >>>>>> >>>>>> Hello, >>>>>> >>>>>> I'm using varnish-2.0.6-2.el5-x86_64 on CentOS 5.8 64-bit, when i run >>>>>> a restart command i recieve this error >>>>>> >>>>>> root at orient [/etc/varnish]# service varnish restart >>>>>> /etc/sysconfig/varnish: line 42: -p: command not found >>>>>> Stopping varnish HTTP accelerator: [ OK ] >>>>>> Starting varnish HTTP accelerator: [ OK ] >>>>>> root at orient [/etc/varnish]# >>>>>> >>>>>> to check /etc/sysconfig/varnish file >>>>>> >>>>>> DAEMON_OPTS="-a :80 \ >>>>>> -T localhost:6082 \ >>>>>> -f /etc/varnish/orient.sameerbook.com.vcl \ >>>>>> -u varnish -g varnish \ >>>>>> -s file,/var/lib/varnish/varnish_storage.bin,1G" >>>>>> -p thread_pools=8 \ >>>>>> -p thread_pool_max=5000 \ >>>>>> -p thread_pool_min=100 \ >>>>>> -p thread_pool_add_delay=2 \ >>>>>> -p sess_timeout=60" >>>>>> >>>>>> >>>>>> The -p command i just add it from this thread: >>>>>> http://techshihab.wordpress.com/2012/03/05/install-varnish-cache/ >>>>>> >>>>>> As i beleave these command to make the Varnish accept more connection >>>>>> quickly for servers who had a huge connection ( ex: my website had each day >>>>>> more than 30.000 visitor per day and a 1500/2000 live visitor sometimes per >>>>>> second ). >>>>>> >>>>>> Hence i don't know if these commands are right or not as i see the >>>>>> error when i did restart for varnish. >>>>>> >>>>>> *Please let me know if there any other commands/feature for Varnish >>>>>> to handle huge connection like mine. >>>>>> >>>>>> Kind Regards, >>>>>> -J >>>>>> >>>>>> _______________________________________________ >>>>>> varnish-misc mailing list >>>>>> varnish-misc at varnish-cache.org >>>>>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>>>>> >>>>>> >>>>> >>>> >>> >>> -- >>> >>> 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. >>> >>> >> > _______________________________________________ > 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 connor.walls at skillpages.com Mon Jul 30 11:04:51 2012 From: connor.walls at skillpages.com (Connor Walls) Date: Mon, 30 Jul 2012 12:04:51 +0100 Subject: High CPU usage when using ban with HTTP PURGE In-Reply-To: <20120726093611.GB31786@yankee.samfundet.no> References: <20120726093611.GB31786@yankee.samfundet.no> Message-ID: Hi Lasse, thanks for the prompt reply. I've done a little bit more investigation on this issue. 1. I tried using smart bans but I saw no change in performance. I tried change the ban from a regex to a straight match on the URL (i.e. from ban("obj.http.x-url ~ " + [header containing regex]) to ban("obj.http.x-url == " + [header containing url]) ) and I still observed the same performance issues. I also tried changing from ban() to ban_url() - no performance improvement. Removing that line from the VCL brings the CPU right back down, so I've concluded the problem is adding the ban to the ban list. Is this an inherently CPU intensive operation, is there going to be no way around this? 2. I've also gone down the route of trying purges because they are significantly faster and look like they can handle the load okay, but my only issue is matching variations of a page. My vcl_hash function looks like this: sub vcl_hash { hash_data(req.http.Accept); hash_data(req.http.X-Forwarded-Proto); } 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? Thanks, Connor Walls -----Original Message----- From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Lasse Karstensen Sent: 26 July 2012 10:36 To: varnish-misc at varnish-cache.org Subject: Re: High CPU usage when using ban with HTTP PURGE Connor Walls: > So, I've been having an issue with CPU usage recently. We run a > cluster of > 3 varnish boxes, running 3.0.2, serving content on a particular port, > and accepting HTTP PURGE request on another (:82). This is used so > whenever a user on the site changes something on their profile page, > one of the backend servers will send a HTTP PURGE request to each box > in the cluster, containing a regex in the header, which is then used > to ban based on a particular URL - the relevant VCL is as follows: [..] > Now what we've been seeing is very high CPU usage with this > functionality, which has been slowly growing over time with increased > traffic on the website, and is now averaging above 70%, peaking at > 100% at times and causing some user requests to fail. The CPU usage > correlates very closely with timeout exceptions we get when making the > HTTP PURGE requests. This became an issue yesterday to the point where > we disabled the HTTP PURGE - CPU usage has now fallen from averaging > > 70% to averaging around 8%, so clearly the purges are the issue. What > I'm wondering is whether or not banning like this is going to be > inherently heavy and I need to find a way to throttle the purge > requests, or if I could rework the VCL so it will be less CPU heavy to > process these requests? Will the CPU usage depend on what the actual regex is? There are two methods for cache invalidation in Varnish 3.0: Purges and bans. Bans are flexible and cool, and purges are less flexible but very fast. Use purges if you can. If you are using a high amount of bans, you should use what Kristian calls "Smart bans" in the Varnish Book: https://www.varnish-software.com/static/book/Cache_invalidation.html#smart-bans -- Lasse Karstensen Varnish Software AS http://www.varnish-software.com/ _______________________________________________ varnish-misc mailing list varnish-misc at varnish-cache.org https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From gordon.schmidt at unister-gmbh.de Mon Jul 2 11:10:09 2012 From: gordon.schmidt at unister-gmbh.de (Gordon Schmidt) Date: Mon, 02 Jul 2012 11:10:09 -0000 Subject: Question about srcbody in VCL_conf Message-ID: <4FF1818A.6080403@unister-gmbh.de> Dear Varnish-Team, while trying to optimize varnish performance for my company i've noticed, that removing all comments from the vcls used in our configuration tribles the requests per seconds from an easy ab test with 100% cache-misses. On an ab test with 100% cache-hits the improvement was about 8-10%. I was a little bit shocked, because i've read that the vcls are compiled to c and execution shouldn't depend on the amount of comments. I took a deeper look and found out, that the compiler appends a char array of the vcl source (srcbody) to the VCL_conf. Which operations need this data? If these operations are not crucial for an production environment (e.g. if it's just used for tracing and source output with -C), could you please add an option to prevent the compiler to add such additional information to the VCL_conf? These operations would have to be reviewed, so they still work with this option activated (if with less verbosity because of the missing data). I know it's very helpful to have such informations in an staging environment, but i wouldn't use tracing in production and so i might not need this extra data there. The performance gain on the other hand could be noticeable. I might get a performance boost with the recent version of varnish already by just minifying the vcl's in the deployment, but there still would be a lot of data left in the VCL_conf, that may not be needed imo. I hope you can shed some light on this matter. Regards Gordon -- E-Mail-Signatur *Gordon Schmidt* Softwareentwickler - QA Unister GmbH Barfu?g?sschen 11 | 04109 Leipzig Telefon: +49 (0)341 65050 - 25757 gordon.schmidt at unister.de www.unister.de Vertretungsberechtigter Gesch?ftsf?hrer: Thomas Wagner Amtsgericht Leipzig, HRB: 19056 -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhishek.lists at gmail.com Fri Jul 6 18:27:18 2012 From: abhishek.lists at gmail.com (Abhishek Chanda) Date: Fri, 06 Jul 2012 18:27:18 -0000 Subject: Varnish API Message-ID: 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? Thanks From donny at rayku.com Tue Jul 10 20:17:40 2012 From: donny at rayku.com (Donny Ouyang) Date: Tue, 10 Jul 2012 20:17:40 -0000 Subject: 503 Error with Varnish - What does this mean? Message-ID: <5E9346B4-2645-4F60-9163-51B061D731FD@rayku.com> Hey guys, I am receiving a 503 error when trying to load my online whiteboard application (managed by Varnish) after re-sizing my cloud server. Does anyone know if this is related to a setting that I will need to modify, and if so, where I should look first? Thanks! Donny From robert at shilston.com Wed Jul 18 07:49:22 2012 From: robert at shilston.com (Robert Shilston) Date: Wed, 18 Jul 2012 08:49:22 +0100 Subject: Varnish 3.0.2 on FreeBSD 8-STABLE: Constant Restart In-Reply-To: References: <1636C4FA-FE82-4964-9DBA-3F180B19B057@hub.org> Message-ID: Marc, We successfully run Varnish in front of a large Wordpress site and achieve a good hit rate. At a very high level, most access is anonymous, and we simple PIPE access if there's wp-admin in the URL. We happen to use a custom plugin to manage submitting bans to Varnish, but I believe off the shelf ones are now available. However, undertaking putting Varnish in front of any site without a strong understanding of how the site works will not yield the best results. Only by understanding the traffic and requests will you be able to safely get a high degree of caching. Rob On 18 Jul 2012, at 02:35, Marc Fournier wrote: > > Okay, I'm lost here ? what sort of site is Varnish good for ? ? A news web site where nobody every logs into the site ? ? > > For instance, the impression I'm getting is that you couldn't use Varnish in front of a Facebook like site, since none of the hits would be anonymous? But would be potentially useful in front of a Slashdot like site, where alot of the hits *are* anonymous? > > The reason I started to look at Varnish was a client asked about it in terms of the W3T Cache that is available for Wordpress ? it apparently has the ability to 'invalidate cache' in a varnish server, so as to force it to reload from apache ? but I don't know enough about Wordpress to know if I can even safely disable cookies, but without disabling cookies, nothing will get cached, making Varnish good as a load balancer, but losing the major benefit ? > > ? no? > > > > On 2012-07-13, at 11:53 PM, Nick Tailor wrote: > >> Also you only want anonymous visits cached. All cookies with session Id should be passed to apache and then you want look trying to setup should ur backend fail run off the cache only >> >> Sent from my iPhone >> >> On Jul 13, 2012, at 10:51 AM, Marc Fournier wrote: >> >>> >>> Morning ? >>> >>> OS: FreeBSD 8.3-STABLE #2: Mon Jul 2 21:20:02 UTC 2012 >>> >>> I am trying to use varnish as a caching front end to a wordpress site ? found some wordpress specific templetes for vcl_recv / vcl_fetch, to provide me with a base, and everything starts up, and stays running fine, *until* I change my DNS to have the domain go through Varnish ? and then it starts rebooting ? >>> >>> This test through, before I switched DNS, I had an uptime (according to varnish stat) of just over 1 hr ? as soon as I switched DNS over, uptime kept resetting to 0, with (after switching DNS back again), I'm currently seeing: >>> >>> 0+00:07:44 >>> Hitrate ratio: 0 0 0 >>> Hitrate avg: 0.0000 0.0000 0.0000 >>> >>> And, according to ps, you can see the Child much younger then the Mgr: >>> >>> root at lb1:/var/log # ps aux | grep varnish >>> www 52281 0.0 0.0 355674084 6432 ?? IJ 5:34PM 0:00.16 varnishd: Varnish-Chld lb1.hospitalityleaders.com (varnishd) >>> root 74714 0.0 0.0 98032 2636 ?? SsJ 4:21PM 0:00.13 varnishd: Varnish-Mgr lb1.hospitalityleaders.com (varnishd) >>> root 71856 0.0 0.0 540 328 2 S+J 5:44PM 0:00.00 grep varnish >>> >>> I'm new with this, so not really sure how best to debug ? I did see something from PHK in one of my searches talking about an issue with cookies ? ? But I haven't been able to re-find that posting ? >>> >>> I've also, so far, been unable to find a core file, although I'm currently running a find across the whole file system to see if there isn't one ? >>> >>> Any suggestions on where to start debugging this, or more information I can provide, would be appreciated ? >>> >>> Thank you ... >>> _______________________________________________ >>> 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 From scrappy at hub.org Wed Jul 18 16:00:33 2012 From: scrappy at hub.org (Marc Fournier) Date: Wed, 18 Jul 2012 12:00:33 -0400 Subject: =?windows-1252?Q?=5BRESOLVED=5D_return=28lookup=29_causes_reset_?= =?windows-1252?Q?=85_=3F?= Message-ID: Morning all ? Okay, after figuring out a whack of things (slowly), I did a trace through my default.vcl file to see if I couldn't figure out where the code has gone wrong ? in order to do this, I simply added, and moved down return(pass) Starting at the top of the vcl_recv function and moving downwards, until I moved it past the point where it restarts ? if I have the default.vcl file written as: # Try a cache-lookup return(pass); return (lookup); The server, and all pages, seem to load fine ? as soon as I move the 'return(pass)' under the 'return(lookup)', any page reload causes a restart, and I get a blank page on my web browser ? Doing a 'panic.show' in varnishadm just shows: varnish> panic.show 300 Child has not panicked or panic has been cleared So, not getting anything from that ? On a whim, before I posted this, I just lowered my cache size from the default of 3G to just 1G ? and now it seems to be running fine ? not sure if I need more then 1G, but at least I now have a starting point ? Thanks for the various suggestions thrown out at me, they all helped ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 203 bytes Desc: Message signed with OpenPGP using GPGMail URL: From gkaragiannidis at dolnet.gr Tue Jul 24 15:26:32 2012 From: gkaragiannidis at dolnet.gr (Karagiannidis Yiannis) Date: Tue, 24 Jul 2012 18:26:32 +0300 Subject: varnish multiple backends question about POST Message-ID: <036901cd69b0$b6f56af0$24e040d0$@dolnet.gr> Hi! I have setup one varnish server for multiple sites running on multiple backends. For example: Domains: domainA.com, domainB.com running on backend: backendC Domains: domain0.com, domain1.com running on backend: backend-10 Everything else goes to default backend DC I also have the following setup In sub vcl_recv { if (req.http.host ~ " domainA.com$") { unset req.http.cookie; set req.backend = backendC; return (lookup); } else if (req.http.host ~ "domainB.com$") { set req.backend = backendC; if ( req.request == "POST" ) { return(pass); } return (lookup); } else if (req.http.host ~ "domain0.com$") { set req.backend = backend-10; if ( req.request == "POST" ) { return(pass); } return (lookup); } else { # Use the default backend for all other requests set req.backend = default; return (lookup); } return (lookup); } My problem is that I have POST requests for both domainB.com and domain0.com and each time I have to use set req.backend = if ( req.request == "POST" ) { return(pass); in order to pass the request to the correct backend Is there a simpler way of handling post requests to different domains? ---------------------------------------------------------------------------- --------------------------------- And a second question if I use if (req.request != "GET" && req.request != "HEAD") { // Not cacheable by default if NOT GET,HEAD return(pass); } Then POST requests are passed to the default backend which, of course gives me an 404 error! Thanks in advance Yiannis From gkaragiannidis at dolnet.gr Tue Jul 24 15:33:07 2012 From: gkaragiannidis at dolnet.gr (Karagiannidis Yiannis) Date: Tue, 24 Jul 2012 18:33:07 +0300 Subject: varnish multiple backends question about POST Message-ID: <036a01cd69b1$a2d0c050$e87240f0$@dolnet.gr> Hi! I have setup one varnish server for multiple sites running on multiple backends. For example: Domains: domainA.com, domainB.com running on backend: backendC Domains: domain0.com, domain1.com running on backend: backend-10 Everything else goes to default backend DC I also have the following setup In sub vcl_recv { if (req.http.host ~ " domainA.com$") { unset req.http.cookie; set req.backend = backendC; return (lookup); } else if (req.http.host ~ "domainB.com$") { set req.backend = backendC; if ( req.request == "POST" ) { return(pass); } return (lookup); } else if (req.http.host ~ "domain0.com$") { set req.backend = backend-10; if ( req.request == "POST" ) { return(pass); } return (lookup); } else { # Use the default backend for all other requests set req.backend = default; return (lookup); } return (lookup); } My problem is that I have POST requests for both domainB.com and domain0.com and each time I have to use set req.backend = if ( req.request == "POST" ) { return(pass); in order to pass the request to the correct backend Is there a simpler way of handling post requests to different domains? ---------------------------------------------------------------------------- --------------------------------- And a second question if I use if (req.request != "GET" && req.request != "HEAD") { // Not cacheable by default if NOT GET,HEAD return(pass); } Then POST requests are passed to the default backend which, of course gives me an 404 error! Thanks in advance Yiannis From tobias.schlottke at metrigo.de Wed Jul 25 12:10:58 2012 From: tobias.schlottke at metrigo.de (Tobias Schlottke) Date: Wed, 25 Jul 2012 14:10:58 +0200 Subject: Sending "If-None-Match"-Header to Backends? Message-ID: <14B4B90E-EAD2-4349-8478-12AEC93FEBAD@metrigo.de> Hi, I'd like to use etag caching directly in my application / verify the eTag in my Application. How is it possible to route the "If-None-Match" header to the backends? It seems that Varnish is cutting out this header by default. Best, Tobias -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 235 bytes Desc: Message signed with OpenPGP using GPGMail URL: From arunavak111 at gmail.com Wed Jul 25 15:56:39 2012 From: arunavak111 at gmail.com (ARUN A.K) Date: Wed, 25 Jul 2012 21:26:39 +0530 Subject: Drupal varnish cache integration. Message-ID: Hi, I would like to use varnish cache system with my website. I download and install varnish module in my site. But there is no better decoumentation is available with drupal varnish module about the integration. So please help me to configure varnish cache with my drupal site. I waiting for hear from you. Faithfully ARUN -------------- next part -------------- An HTML attachment was scrubbed... URL: From ribeiro.it at gmail.com Thu Jul 26 15:07:27 2012 From: ribeiro.it at gmail.com (Thiago Ribeiro) Date: Thu, 26 Jul 2012 12:07:27 -0300 Subject: Altered libvmod_redis to use arrays as strings and improve performance Message-ID: Hi, I made a change in libvmod_redis to use returned arrays as strings and improve performance during queries on redis. With just a single check you can do interesting things. Please check examples/arrays.vcl to take a look. I send a pull request to the original project, and I'm waiting for authorization to be included in that. This is my fork with the changes pointed above: https://github.com/ribeiroit/libvmod-redis/ I think that it can be useful. Thank you. Cheers, -- Thiago Ribeiro -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdarbinyan19 at gmail.com Mon Jul 30 11:10:40 2012 From: gdarbinyan19 at gmail.com (Gevorg Darbinyan) Date: Mon, 30 Jul 2012 15:10:40 +0400 Subject: Problem with varnish disable Message-ID: Hi dear administrator, sorry for worry, but I have a problem with Varnish cache, I need to disable Varnish temporary, but when I modifying the existing code my site fucking up,please help me, thanks very very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From apj at mutt.dk Mon Jul 30 12:21:36 2012 From: apj at mutt.dk (Andreas Plesner Jacobsen) Date: Mon, 30 Jul 2012 14:21:36 +0200 Subject: Panic message: Missing errorhandling code in vfp_esi_end(), cache_esi_fetch.c In-Reply-To: References: Message-ID: <20120730122135.GM24123@nerd.dk> On Wed, Apr 04, 2012 at 06:23:14PM +0200, Pablo Rom?n wrote: > > According to https://www.varnish-cache.org/trac/ticket/1044, this issue > should have been fixed in 3.0.2. Any ideas? #1044 wasn't integrated in 3.0.2, but will be in 3.0.3 Please use varnish-misc for these types of questions. Varnish-bugs is for mails from the bug tracker -- Andreas From gdarbinyan at bk.ru Mon Jul 30 13:10:21 2012 From: gdarbinyan at bk.ru (=?UTF-8?B?R2V2b3JnIERhcmJpbnlhbg==?=) Date: Mon, 30 Jul 2012 17:10:21 +0400 Subject: =?UTF-8?B?UHJvYmxlbSB3aXRoIHZhcm5pc2g=?= Message-ID: <1343653821.675558917@f103.mail.ru> -- Hi dear administrator, sorry for worry, but I have a problem with Varnish cache, I need to disable Varnish temporary, but when I modifying the existing code my site fucking up,please help me, thanks very very much.? -------------- next part -------------- An HTML attachment was scrubbed... URL: From phk at phk.freebsd.dk Mon Jul 30 13:44:10 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Mon, 30 Jul 2012 13:44:10 +0000 Subject: Question about srcbody in VCL_conf In-Reply-To: Your message of "Mon, 02 Jul 2012 13:10:02 +0200." <4FF1818A.6080403@unister-gmbh.de> Message-ID: <2010.1343655850@critter.freebsd.dk> In message <4FF1818A.6080403 at unister-gmbh.de>, Gordon Schmidt writes: >while trying to optimize varnish performance for my company i've >noticed, that removing all comments from the vcls used in our >configuration tribles the requests per seconds from an easy ab test with >100% cache-misses. How big is your VCL with/without comments ? -- 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 kervin at adevsoft.com Mon Jul 30 14:38:33 2012 From: kervin at adevsoft.com (Kervin L. Pierre) Date: Mon, 30 Jul 2012 14:38:33 +0000 Subject: 503 Error with Varnish - What does this mean? In-Reply-To: <5E9346B4-2645-4F60-9163-51B061D731FD@rayku.com> References: <5E9346B4-2645-4F60-9163-51B061D731FD@rayku.com> Message-ID: Varnish throws 503 errors for a variety of underlying reasons. You may need to check "varnishlog" to get some more information, the "FetchError" tagged messages will help you narrow down the cause. It can be that one of a variety of timeout values have been exceeded, backend is intermittently available, etc. Best regards, Kervin Adevsoft Inc Business Software Development http://adevsoft.com/ > -----Original Message----- > From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc- > bounces at varnish-cache.org] On Behalf Of Donny Ouyang > Sent: Tuesday, July 10, 2012 4:18 PM > To: varnish-misc at varnish-cache.org > Subject: 503 Error with Varnish - What does this mean? > > Hey guys, > > I am receiving a 503 error when trying to load my online whiteboard > application (managed by Varnish) after re-sizing my cloud server. Does > anyone know if this is related to a setting that I will need to modify, > and if so, where I should look first? > > Thanks! > Donny > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From phk at phk.freebsd.dk Mon Jul 30 16:52:42 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Mon, 30 Jul 2012 16:52:42 +0000 Subject: Child constantly crashes in Mac OS X In-Reply-To: Your message of "Mon, 23 Jul 2012 11:57:40 +0900." Message-ID: <82263.1343667162@critter.freebsd.dk> In message , Javi Lavandei ra writes: Can you check the manual pages and see if it mentions how long timeouts you can specify to setsockopt(SO_SNDTIMEO) ? >Child (7681) died signal=6 >Child (7681) Panic message: Assert error in VCA_Prep(), cache_acceptor.c line 185: > Condition(VTCP_Check(setsockopt(sp->fd, 0xffff, 0x1005, &tv_sndtimeo, sizeof tv_sndtimeo))) not true. -- 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 javi at lavandeira.net Mon Jul 30 17:06:58 2012 From: javi at lavandeira.net (Javi Lavandeira) Date: Tue, 31 Jul 2012 02:06:58 +0900 Subject: Child constantly crashes in Mac OS X In-Reply-To: <82263.1343667162@critter.freebsd.dk> References: <82263.1343667162@critter.freebsd.dk> Message-ID: Hi phk, > In message , Javi Lavandei > ra writes: > > Can you check the manual pages and see if it mentions how long timeouts > you can specify to setsockopt(SO_SNDTIMEO) ? > >> Child (7681) died signal=6 >> Child (7681) Panic message: Assert error in VCA_Prep(), cache_acceptor.c line 185: >> Condition(VTCP_Check(setsockopt(sp->fd, 0xffff, 0x1005, &tv_sndtimeo, sizeof tv_sndtimeo))) not true. Let's see if this helps: From setsockopt()'s manpage: [...] Most socket-level options utilize an int parameter for option_value. For setsockopt(), the parameter should be non-zero to enable a boolean option, or zero if the option is to be dis- abled. SO_LINGER uses a struct linger parameter, defined in , which specifies the desired state of the option and the linger interval (see below). SO_SNDTIMEO and SO_RCVTIMEO use a struct timeval parameter, defined in . [...] SO_SNDTIMEO is an option to set a timeout value for output operations. It accepts a struct timeval parameter with the number of seconds and microseconds used to limit waits for output operations to complete. If a send operation has blocked for this much time, it returns with a partial count or with the error EWOULDBLOCK if no data were sent. In the current implementa- tion, this timer is restarted each time additional data are delivered to the protocol, imply- ing that the limit applies to output portions ranging in size from the low-water mark to the high-water mark for output. [...] And I can see this in the header files: /usr/include/sys/_structs.h: #define _STRUCT_TIMEVAL struct timeval _STRUCT_TIMEVAL { __darwin_time_t tv_sec; /* seconds */ __darwin_suseconds_t tv_usec; /* and microseconds */ }; /usr/include/sys/types.h: typedef __darwin_time_t time_t; typedef __darwin_suseconds_t suseconds_t; /usr/include/sys/_types.h: typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */ Hope it helps. -- Javi Lavandeira Twitter: @javilm Blog: http://www.lavandeira.net/blog/ Email and hosting: http://www.lavandeira.net/services/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From phk at phk.freebsd.dk Tue Jul 31 08:44:56 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 31 Jul 2012 08:44:56 +0000 Subject: Question about srcbody in VCL_conf In-Reply-To: Your message of "Tue, 31 Jul 2012 10:10:18 +0200." <501792EA.5060901@unister-gmbh.de> Message-ID: <84952.1343724296@critter.freebsd.dk> In message <501792EA.5060901 at unister-gmbh.de>, Gordon Schmidt writes: >By now I have written a small python script to minify the vcl config by >removing comments and empty lines and also resolving includes. >So i'm using just one VCL-File with 33316 bytes instead of a >configuration of 110 vcl files with 41635 bytes in sum. It sounds really strange that this should have the performance effect you claim... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at phk.freebsd.dk Tue Jul 31 09:37:16 2012 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 31 Jul 2012 09:37:16 +0000 Subject: Question about srcbody in VCL_conf In-Reply-To: Your message of "Tue, 31 Jul 2012 11:24:38 +0200." <5017A456.7090905@unister-gmbh.de> Message-ID: <7085.1343727436@critter.freebsd.dk> In message <5017A456.7090905 at unister-gmbh.de>, Gordon Schmidt writes: >> It sounds really strange that this should have the performance >> effect you claim... >I didn't get the 8%-10% by minifying - the performance gain with >minified vcls is lower. >Just for testing, I removed the part in the vcc_compile.c responsable >for adding scrbody to the compiled object to get the full performance >improvement. The only thing you have done is remove the memory footprint by a few kilobytes. If that radically changes your performance it can only be because it allows you to operate entirely inside the L1/L2/L3 cache of your CPU. That would indicate that your benchmark is so trivially simple that it is invalid for any realistisk workload with more than one URL. > -- 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 zeeshan at infoshield.info Tue Jul 31 18:51:47 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Tue, 31 Jul 2012 20:51:47 +0200 Subject: Purging practice ? Message-ID: Hi, What is the best way to purge cache . actually i have wordpress and joomla site .. when we update an article the content remains same on client side .. because it is taking from cache as it shd.. We manually restart cache .. not good option . any other easy way to purge it wit some url ? or any other best practice in it ? BR Zeeshan -------------- next part -------------- An HTML attachment was scrubbed... URL: From pprocacci at datapipe.com Tue Jul 31 18:54:45 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Tue, 31 Jul 2012 13:54:45 -0500 Subject: Purging practice ? In-Reply-To: References: Message-ID: <20120731185445.GI43986@nat.myhome> https://www.varnish-cache.org/docs/trunk/tutorial/purging.html You may find the above url helpful. ~Paul On Tue, Jul 31, 2012 at 08:51:47PM +0200, Zeeshan Ali Shah wrote: > Hi, What is the best way to purge cache . actually i have wordpress and > joomla site .. when we update an article the content remains same on > client side .. because it is taking from cache as it shd.. > > We manually restart cache .. not good option . > > any other easy way to purge it wit some url ? or any other best > practice in it ? > > BR > > Zeeshan > _______________________________________________ > 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 zeeshan at infoshield.info Tue Jul 31 18:58:59 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Tue, 31 Jul 2012 20:58:59 +0200 Subject: Purging practice ? In-Reply-To: <20120731185445.GI43986@nat.myhome> References: <20120731185445.GI43986@nat.myhome> Message-ID: Yes i was reading the same.. nice article thanks Zee On Tue, Jul 31, 2012 at 8:54 PM, Paul A. Procacci wrote: > https://www.varnish-cache.org/docs/trunk/tutorial/purging.html > > You may find the above url helpful. > > ~Paul > > On Tue, Jul 31, 2012 at 08:51:47PM +0200, Zeeshan Ali Shah wrote: > > Hi, What is the best way to purge cache . actually i have wordpress > and > > joomla site .. when we update an article the content remains same on > > client side .. because it is taking from cache as it shd.. > > > > We manually restart cache .. not good option . > > > > any other easy way to purge it wit some url ? or any other best > > practice in it ? > > > > BR > > > > Zeeshan > > > _______________________________________________ > > 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. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Tue Jul 31 19:05:23 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Tue, 31 Jul 2012 21:05:23 +0200 Subject: Purging practice ? In-Reply-To: References: <20120731185445.GI43986@nat.myhome> Message-ID: Is there any web admin panel for varnish ? Zee On Tue, Jul 31, 2012 at 8:58 PM, Zeeshan Ali Shah wrote: > Yes i was reading the same.. nice article thanks > > > Zee > > > On Tue, Jul 31, 2012 at 8:54 PM, Paul A. Procacci wrote: > >> https://www.varnish-cache.org/docs/trunk/tutorial/purging.html >> >> You may find the above url helpful. >> >> ~Paul >> >> On Tue, Jul 31, 2012 at 08:51:47PM +0200, Zeeshan Ali Shah wrote: >> > Hi, What is the best way to purge cache . actually i have wordpress >> and >> > joomla site .. when we update an article the content remains same on >> > client side .. because it is taking from cache as it shd.. >> > >> > We manually restart cache .. not good option . >> > >> > any other easy way to purge it wit some url ? or any other best >> > practice in it ? >> > >> > BR >> > >> > Zeeshan >> >> > _______________________________________________ >> > 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. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Travis.Crowder at penton.com Tue Jul 31 19:07:39 2012 From: Travis.Crowder at penton.com (Crowder, Travis) Date: Tue, 31 Jul 2012 19:07:39 +0000 Subject: Purging practice ? In-Reply-To: References: <20120731185445.GI43986@nat.myhome> Message-ID: <61E9173DF681274790BA29C89A72200C06A5BEA0@ksopexchm01.pme.penton.com> https://www.varnish-software.com/products/admin-console From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Zeeshan Ali Shah Sent: Tuesday, July 31, 2012 2:05 PM To: varnish-misc at varnish-cache.org Subject: Re: Purging practice ? Is there any web admin panel for varnish ? Zee On Tue, Jul 31, 2012 at 8:58 PM, Zeeshan Ali Shah > wrote: Yes i was reading the same.. nice article thanks Zee On Tue, Jul 31, 2012 at 8:54 PM, Paul A. Procacci > wrote: https://www.varnish-cache.org/docs/trunk/tutorial/purging.html You may find the above url helpful. ~Paul On Tue, Jul 31, 2012 at 08:51:47PM +0200, Zeeshan Ali Shah wrote: > Hi, What is the best way to purge cache . actually i have wordpress and > joomla site .. when we update an article the content remains same on > client side .. because it is taking from cache as it shd.. > > We manually restart cache .. not good option . > > any other easy way to purge it wit some url ? or any other best > practice in it ? > > BR > > Zeeshan > _______________________________________________ > 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeeshan at infoshield.info Tue Jul 31 19:40:40 2012 From: zeeshan at infoshield.info (Zeeshan Ali Shah) Date: Tue, 31 Jul 2012 21:40:40 +0200 Subject: Purging practice ? In-Reply-To: <61E9173DF681274790BA29C89A72200C06A5BEA0@ksopexchm01.pme.penton.com> References: <20120731185445.GI43986@nat.myhome> <61E9173DF681274790BA29C89A72200C06A5BEA0@ksopexchm01.pme.penton.com> Message-ID: hmm it is for enterprise .. any open source Zee On Tue, Jul 31, 2012 at 9:07 PM, Crowder, Travis wrote: > https://www.varnish-software.com/products/admin-console**** > > ** ** > > ** ** > > *From:* varnish-misc-bounces at varnish-cache.org [mailto: > varnish-misc-bounces at varnish-cache.org] *On Behalf Of *Zeeshan Ali Shah > *Sent:* Tuesday, July 31, 2012 2:05 PM > *To:* varnish-misc at varnish-cache.org > *Subject:* Re: Purging practice ?**** > > ** ** > > Is there any web admin panel for varnish ?**** > > ** ** > > Zee**** > > On Tue, Jul 31, 2012 at 8:58 PM, Zeeshan Ali Shah > wrote:**** > > Yes i was reading the same.. nice article thanks **** > > ** ** > > ** ** > > Zee**** > > ** ** > > On Tue, Jul 31, 2012 at 8:54 PM, Paul A. Procacci > wrote:**** > > https://www.varnish-cache.org/docs/trunk/tutorial/purging.html > > You may find the above url helpful. > > ~Paul**** > > > On Tue, Jul 31, 2012 at 08:51:47PM +0200, Zeeshan Ali Shah wrote: > > Hi, What is the best way to purge cache . actually i have wordpress > and > > joomla site .. when we update an article the content remains same on > > client side .. because it is taking from cache as it shd.. > > > > We manually restart cache .. not good option . > > > > any other easy way to purge it wit some url ? or any other best > > practice in it ? > > > > BR > > > > Zeeshan**** > > > _______________________________________________ > > 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.**** > > ** ** > > ** ** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Travis.Crowder at penton.com Tue Jul 31 19:42:54 2012 From: Travis.Crowder at penton.com (Crowder, Travis) Date: Tue, 31 Jul 2012 19:42:54 +0000 Subject: Purging practice ? In-Reply-To: References: <20120731185445.GI43986@nat.myhome> <61E9173DF681274790BA29C89A72200C06A5BEA0@ksopexchm01.pme.penton.com> Message-ID: <61E9173DF681274790BA29C89A72200C06A5BF41@ksopexchm01.pme.penton.com> Doesn't look like there is much out there ... http://www.google.com/#hl=en&q=varnish+console+open+source From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Zeeshan Ali Shah Sent: Tuesday, July 31, 2012 2:41 PM Cc: varnish-misc at varnish-cache.org Subject: Re: Purging practice ? hmm it is for enterprise .. any open source Zee On Tue, Jul 31, 2012 at 9:07 PM, Crowder, Travis > wrote: https://www.varnish-software.com/products/admin-console From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Zeeshan Ali Shah Sent: Tuesday, July 31, 2012 2:05 PM To: varnish-misc at varnish-cache.org Subject: Re: Purging practice ? Is there any web admin panel for varnish ? Zee On Tue, Jul 31, 2012 at 8:58 PM, Zeeshan Ali Shah > wrote: Yes i was reading the same.. nice article thanks Zee On Tue, Jul 31, 2012 at 8:54 PM, Paul A. Procacci > wrote: https://www.varnish-cache.org/docs/trunk/tutorial/purging.html You may find the above url helpful. ~Paul On Tue, Jul 31, 2012 at 08:51:47PM +0200, Zeeshan Ali Shah wrote: > Hi, What is the best way to purge cache . actually i have wordpress and > joomla site .. when we update an article the content remains same on > client side .. because it is taking from cache as it shd.. > > We manually restart cache .. not good option . > > any other easy way to purge it wit some url ? or any other best > practice in it ? > > BR > > Zeeshan > _______________________________________________ > 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From apriou at gmail.com Tue Jul 31 20:12:49 2012 From: apriou at gmail.com (Alexandre Priou) Date: Tue, 31 Jul 2012 22:12:49 +0200 Subject: Purging practice ? In-Reply-To: References: <20120731185445.GI43986@nat.myhome> <61E9173DF681274790BA29C89A72200C06A5BEA0@ksopexchm01.pme.penton.com> Message-ID: check that : http://giantdorks.org/alain/exploring-methods-to-purge-varnish-cache/ On Tue, Jul 31, 2012 at 9:40 PM, Zeeshan Ali Shah wrote: > hmm it is for enterprise .. any open source > > > Zee > > > On Tue, Jul 31, 2012 at 9:07 PM, Crowder, Travis < > Travis.Crowder at penton.com> wrote: > >> https://www.varnish-software.com/products/admin-console**** >> >> ** ** >> >> ** ** >> >> *From:* varnish-misc-bounces at varnish-cache.org [mailto: >> varnish-misc-bounces at varnish-cache.org] *On Behalf Of *Zeeshan Ali Shah >> *Sent:* Tuesday, July 31, 2012 2:05 PM >> *To:* varnish-misc at varnish-cache.org >> *Subject:* Re: Purging practice ?**** >> >> ** ** >> >> Is there any web admin panel for varnish ?**** >> >> ** ** >> >> Zee**** >> >> On Tue, Jul 31, 2012 at 8:58 PM, Zeeshan Ali Shah < >> zeeshan at infoshield.info> wrote:**** >> >> Yes i was reading the same.. nice article thanks **** >> >> ** ** >> >> ** ** >> >> Zee**** >> >> ** ** >> >> On Tue, Jul 31, 2012 at 8:54 PM, Paul A. Procacci >> wrote:**** >> >> https://www.varnish-cache.org/docs/trunk/tutorial/purging.html >> >> You may find the above url helpful. >> >> ~Paul**** >> >> >> On Tue, Jul 31, 2012 at 08:51:47PM +0200, Zeeshan Ali Shah wrote: >> > Hi, What is the best way to purge cache . actually i have wordpress >> and >> > joomla site .. when we update an article the content remains same on >> > client side .. because it is taking from cache as it shd.. >> > >> > We manually restart cache .. not good option . >> > >> > any other easy way to purge it wit some url ? or any other best >> > practice in it ? >> > >> > BR >> > >> > Zeeshan**** >> >> > _______________________________________________ >> > 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 > -- Alexandre Priou Analyste Concepteur Web 64 rue de l'Essonne 91000 ?vry tel_perso : 06.14.83.81.03 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gordon.schmidt at unister-gmbh.de Tue Jul 31 08:10:18 2012 From: gordon.schmidt at unister-gmbh.de (Gordon Schmidt) Date: Tue, 31 Jul 2012 10:10:18 +0200 Subject: Question about srcbody in VCL_conf In-Reply-To: <2010.1343655850@critter.freebsd.dk> References: <2010.1343655850@critter.freebsd.dk> Message-ID: <501792EA.5060901@unister-gmbh.de> On 30.07.2012 15:44, Poul-Henning Kamp wrote: > In message <4FF1818A.6080403 at unister-gmbh.de>, Gordon Schmidt writes: > >> while trying to optimize varnish performance for my company i've >> noticed, that removing all comments from the vcls used in our >> configuration tribles the requests per seconds from an easy ab test with >> 100% cache-misses. > How big is your VCL with/without comments ? > Hi, my vcl config is set up to provide caching and load balancing for about 20 portals with several backends each. By now I have written a small python script to minify the vcl config by removing comments and empty lines and also resolving includes. So i'm using just one VCL-File with 33316 bytes instead of a configuration of 110 vcl files with 41635 bytes in sum. Regards Gordon -- E-Mail-Signatur *Gordon Schmidt* Softwareentwickler - QA Unister GmbH Barfu?g?sschen 11 | 04109 Leipzig Telefon: +49 (0)341 65050 - 25757 gordon.schmidt at unister.de www.unister.de Vertretungsberechtigter Gesch?ftsf?hrer: Thomas Wagner Amtsgericht Leipzig, HRB: 19056 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gordon.schmidt at unister-gmbh.de Tue Jul 31 09:24:38 2012 From: gordon.schmidt at unister-gmbh.de (Gordon Schmidt) Date: Tue, 31 Jul 2012 11:24:38 +0200 Subject: Question about srcbody in VCL_conf In-Reply-To: <84952.1343724296@critter.freebsd.dk> References: <84952.1343724296@critter.freebsd.dk> Message-ID: <5017A456.7090905@unister-gmbh.de> On 31.07.2012 10:44, Poul-Henning Kamp wrote: > In message <501792EA.5060901 at unister-gmbh.de>, Gordon Schmidt writes: > >> By now I have written a small python script to minify the vcl config by >> removing comments and empty lines and also resolving includes. >> So i'm using just one VCL-File with 33316 bytes instead of a >> configuration of 110 vcl files with 41635 bytes in sum. > It sounds really strange that this should have the performance > effect you claim... I didn't get the 8%-10% by minifying - the performance gain with minified vcls is lower. Just for testing, I removed the part in the vcc_compile.c responsable for adding scrbody to the compiled object to get the full performance improvement. My changes for testing were: index 66d89f5..e51833a 100644 --- a/lib/libvcl/vcc_compile.c +++ b/lib/libvcl/vcc_compile.c @@ -343,16 +343,7 @@ EmitStruct(const struct vcc *tl) } Fc(tl, 0, "};\n"); - Fc(tl, 0, "\nconst char *srcbody[%u] = {\n", tl->nsources); - VTAILQ_FOREACH(sp, &tl->sources, list) { - Fc(tl, 0, " /* "); - EncString(tl->fc, sp->name, NULL, 0); - Fc(tl, 0, "*/\n"); - Fc(tl, 0, "\t"); - EncString(tl->fc, sp->b, sp->e, 1); - Fc(tl, 0, ",\n"); - } - Fc(tl, 0, "};\n"); + Fc(tl, 0, "\nconst char *srcbody[%u] = NULL;\n"); Fc(tl, 0, "\nstatic struct director\t*directors[%d];\n", tl->ndirector); Regards Gordon -- E-Mail-Signatur *Gordon Schmidt* Softwareentwickler - QA Unister GmbH Barfu?g?sschen 11 | 04109 Leipzig Telefon: +49 (0)341 65050 - 25757 gordon.schmidt at unister.de www.unister.de Vertretungsberechtigter Gesch?ftsf?hrer: Thomas Wagner Amtsgericht Leipzig, HRB: 19056 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gordon.schmidt at unister-gmbh.de Tue Jul 31 13:07:31 2012 From: gordon.schmidt at unister-gmbh.de (Gordon Schmidt) Date: Tue, 31 Jul 2012 15:07:31 +0200 Subject: Question about srcbody in VCL_conf In-Reply-To: <7085.1343727436@critter.freebsd.dk> References: <7085.1343727436@critter.freebsd.dk> Message-ID: <5017D893.9050306@unister-gmbh.de> On 31.07.2012 11:37, Poul-Henning Kamp wrote: > In message <5017A456.7090905 at unister-gmbh.de>, Gordon Schmidt writes: > >>> It sounds really strange that this should have the performance >>> effect you claim... >> I didn't get the 8%-10% by minifying - the performance gain with >> minified vcls is lower. >> Just for testing, I removed the part in the vcc_compile.c responsable >> for adding scrbody to the compiled object to get the full performance >> improvement. > The only thing you have done is remove the memory footprint by a > few kilobytes. > > If that radically changes your performance it can only be because > it allows you to operate entirely inside the L1/L2/L3 cache of your > CPU. > > That would indicate that your benchmark is so trivially simple that > it is invalid for any realistisk workload with more than one URL. I haven't said anything different. The test is simple as i already stated in my very first post. Still - an option to reduce the memory footprint, when the additional data is not needed, would be nice. Btw. the situation becomes relevant, when you have one or only few resources that are not cachable and will hit much more frequently than all the other resources. Regards Gordon -- E-Mail-Signatur *Gordon Schmidt* Softwareentwickler - QA Unister GmbH Barfu?g?sschen 11 | 04109 Leipzig Telefon: +49 (0)341 65050 - 25757 gordon.schmidt at unister.de www.unister.de Vertretungsberechtigter Gesch?ftsf?hrer: Thomas Wagner Amtsgericht Leipzig, HRB: 19056 -------------- next part -------------- An HTML attachment was scrubbed... URL: