mass purge causes high load?

Dag-Erling Smørgrav des at linpro.no
Sun Apr 13 12:08:55 CEST 2008


Sascha Ottolski <ottolski at web.de> writes:
> I just needed to get rid of about 27,000 stale URLs, that were cached as 
> 404 or 302 due to a configuration error on the backends.

Why couldn't you just wait for them to expire?

> So I did a url.purge in a loop, sleeping 0.1 seconds after each URL:
>
> for i in `cat notfound.txt.sorted` ; do varnishadm -T:81 url.purge $i; 
> sleep 0.1; done

That's a very, very bad idea.  Varnish must now check every object in
cache against 27,000 regular expressions.

If you know the exact URL to purge, use an HTTP PURGE (see VCL code
examples in the vcl man page)

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no



More information about the varnish-misc mailing list