cache purging questions

Matthew Hoopes matthew.hoopes at
Mon May 25 19:37:11 CEST 2009

On Mon, May 25, 2009 at 1:33 PM, Matthew Hoopes <matthew.hoopes at>wrote:

> Hi,
> I run a site with many subdomains. (Something like
> When a user changes something about their data on the backend, I need to
> purge the varnish caches. So, I'm trying to purge the caches only for that
> subdomain, and not everything on . To purge these caches, I
> (programmatically) ssh to each of my varnish proxy boxes, and run this
> command:
> echo url.purge ** | nc -q 1 localhost 6082
> Now, this does work. However, I get the debug message:
>     0 Debug          "REGEX: <Invalid preceding regular expression>"
> Is there something I can change with my regex to not have this message?
> It's strange, because the cache is purged of items requested from that
> domain.
> Secondly, when I do this, the first request after that cache purge gives an
> empty response.
> hoopes at crotty:/tmp$ curl
> curl: (52) Empty reply from server
> This is the only thing that shows up while I am running varnishlog -x CLI
>    13 SessionOpen  c 23780
> Nothing shows up in varnishncsa, either (leading me to believe varnish
> doesn't see it as a valid request?).  Then, after that, all subsequent
> requests make it to the backend (and are seen by varnishncsa), and are
> properly cached again. This happens from any host, not just the one i did
> the purge from.
> (After a little testing, if i wait a while (say, enough to read a couple
> blogs), the request goes through properly...a held connection times out?)
> If anyone can help me with either of these two problems (or just point me
> in the correct direction), i'd be much obliged.
> Thanks,
> matt hoopes

Shoot, sorry should have mentioned the version...looks like 1.0.3...should I
just upgrade to 2?

 root at proxy1:/etc/varnish# dpkg-query -s varnish
Package: varnish
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 736
Maintainer: Ubuntu MOTU Developers <ubuntu-motu at>
Architecture: amd64
Version: 1.0.3-2ubuntu1
Depends: gcc (>= 3.3), libc6 (>= 2.4), libc6-dev, libncurses5 (>=
 /etc/varnish/vcl.conf be65fff525f05bcd5801c8c56d09672f
 /etc/default/varnish 1eacf59b849abf38adaf756d14978633
 /etc/init.d/varnish 674b353ab86aa5d1b37d1140ec9df118
Description: A state-of-the-art, high-performance HTTP accelerator
 varnish is the server-side alternative to Squid, written primarily with
 speed in mind, and with a look to implementing full ESI-support in
 a future release.
 The goal of the Varnish project is to develop a state-of-the-art,
 high-performance HTTP accelerator.
 Varnish is targeted primarily at the FreeBSD 6 and Linux 2.6 platforms, and
 will take full advantage of the advanced I/O features offered by these
 operating systems.
Original-Maintainer: Stig Sandbeck Mathiesen <ssm at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list