Memory utilisation gradually increasing
Dridi Boukelmoune
dridi at varni.sh
Tue Jul 31 09:03:01 UTC 2018
On Mon, Jul 30, 2018 at 2:50 PM, FULLER, David <FULLERD at parliament.uk> wrote:
> Thanks Dridi,
>
> After further investigation I found that we do have a python/cron job running that checks for backend changes and if so does a vcl.load. This has resulted in a growing number of VCLs being loaded, as you suspected. After a redeploying the Varnish container this morning and then monitoring varnishadm we have gone from around 30 VCLs loaded to over 200 in a few hours. Is there a way to limit the number of VCLs that can be loaded, with older ones being dropped as new ones are loaded?
For Varnish 6.0 we released a new varnishreload script, see its usage:
https://github.com/varnishcache/pkg-varnish-cache/blob/0ad2f22629c4a368959c423a19e352c9c6c79682/systemd/varnishreload#L46-L74
The main goals were to unify the reload script on all the platforms we
support and simplify the logic by only supporting the privileged
"service manager" use case. As a result it was also easy to add the -m
option to discard old reloads if have more than "maximum" reload VCLs.
In other words, it's up to the python script scheduled by your cron
job to keep track of reloads and discard older ones according to your
policy.
Dridi
More information about the varnish-misc
mailing list