Ban lurker doesn't seem to remove bans

VNX de Vries vnxsmail at gmail.com
Tue Apr 7 23:14:50 CEST 2015


Hi,

We use Varnish 4.0.3 for out website and serve a lot of pages with
semi-unlimited (i.e. 1 year) TTL. When content gets changed, we ban te
cache objects through special http headers. Please note that there can be
250.000+ new bans per day.

Our problem is that page load times turn out to be slower and slower the
longer Varnish runs. When checking with "varnishstat -1" it seems that band
never get deleted. MAIN.bans_deleted is always 0.

When i login to varnishadm and type the ban.list command I see a long list
of bans with status "C". Varnishstat learns me that there can be hundreds
of thousands of these bans with C status active. I don't have a clue what
this C means, I can't find it anywhere in the documentation.

---

Here are the important part from our VCL:

sub vcl_recv {

if (req.method == "BAN") {
if (!client.ip ~ purgers) {
return (synth(405, "Not allowed"));
}

if (req.http.X-Cache-Tags) {
ban("obj.http.X-Cache-Tags ~ " + req.http.X-Cache-Tags);
return (synth(200, "Banned"));
}

if (req.http.X-Url) {
ban("obj.http.x-origurl ~ " + req.http.X-Url);
return (synth(200, "Banned"));
}

return (synth(405, "No cache tags provided"));
}

...
}

sub vcl_backend_response {
set beresp.http.x-origurl = bereq.url;
...
}

---

Here's an example of the ban.list output from varnishadm:

1428440119.975700 20 C
1428440119.875178 21 C
1428440119.775048 0 C
1428440119.675068 1 C
1428440119.575059 0 C
1428440119.474236 0 C
1428440119.374664 1 C
1428440119.275055 0 C
1428440119.173203 1 C
1428440119.070568 1 C
1428440118.968622 0 C
1428440118.867101 0 C
1428440118.767099 2 C
1428440118.665274 3 C
1428440118.565995 2 C
1428440118.463959 4 C
1428440118.360379 3 C
1428440118.259975 4 C
1428440118.157665 4 C
1428440118.054391 8 C
1428440117.953973 3 C
1428440117.851816 16 C
1428440117.749820 7 C
1428440117.647959 8 C
1428440117.546431 2 C
1428440117.446593 2 C
1428440117.345096 1 C
1428440117.245096 0 C
1428440117.143993 0 C
1428440117.!

---

Here are my two questions:

1) What does this C status mean?

2) Why aren't bans ever deleted?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20150407/1ffd6e35/attachment.html>


More information about the varnish-misc mailing list