Varnish 2.0.3 consuming excessive memory

Dag-Erling Smørgrav des at des.no
Wed Apr 8 11:41:59 CEST 2009


"Darryl Dixon - Winterhouse Consulting"
<darryl.dixon at winterhouseconsulting.com> writes:
> +    if (req.http.Pragma ~ ".*no-cache.*" || req.http.Cache-Control ~
> ".*no-cache.*") {
> +        purge_url(regsub(req.url, "[?].*$", ".*$"));
> +    }
> +

It would be interesting to see how often this condition is true...

> Is there possibly something in the regsub engine being triggered that is
> very expensive and would cause it to consume and hold on to large amounts
> of memory?

I don't think so.  However, your code will add an entry to the ban list
every time a request that matches the above condition is received, and
this entry will remain on the list until every object that was in the
cache before the entry was added has been requested at least once.

If you really want no-cache to purge the requested object, you should do
it in vcl_hit (set obj.ttl to 0 and pass).  Otherwise, you should simply
pass directly from vcl_recv.

DES
-- 
Dag-Erling Smørgrav - des at des.no



More information about the varnish-misc mailing list