cache purging questions

Matthew Hoopes matthew.hoopes at gmail.com
Mon May 25 19:33:16 CEST 2009


Hi,

I run a site with many subdomains. (Something like username.domain.com).
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 domain.com . To purge these caches, I
(programmatically) ssh to each of my varnish proxy boxes, and run this
command:

echo url.purge *username.domain.com* | 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 http://username.domain.com/file.html
curl: (52) Empty reply from server

This is the only thing that shows up while I am running varnishlog -x CLI

   13 SessionOpen  c 209.114.135.220 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20090525/2d6875ca/attachment-0001.html>


More information about the varnish-misc mailing list