Configure htcacheclean for zuul-web

We are starting to use the apache2 mod_cache_disk functionality more now
and during use the cache has grown into the 1.5GB range. The
htcacheclean process is cleaning up every 2 hours which is how it is
getting behind with its limit of 300MB. Reduce the interval to 15
minutes by supplying an /etc/default/apache-htcacheclean config.

Note we cache status.json files which are only valid for a very short
period of time. This likely explains the quick growth of the cache.

Change-Id: Iff00fb1806796ef6db26e53e026c533c47a902b4
This commit is contained in:
Clark Boylan 2020-04-30 16:23:51 -07:00
parent 6b1feb8ae6
commit 608f56ab82
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# This file must only contain KEY=VALUE lines. Do not use advanced
# shell script constructs!
## run mode: cron, daemon
## run in daemon mode or as daily cron job
## default: daemon
HTCACHECLEAN_MODE=daemon
## cache size
HTCACHECLEAN_SIZE=300M
## interval: if in daemon mode, clean cache every x minutes
HTCACHECLEAN_DAEMON_INTERVAL=15
## path to cache
## must be the same as in CacheRoot directive
#HTCACHECLEAN_PATH=/var/cache/apache2/mod_cache_disk
## additional options:
## -n : be nice
## -t : remove empty directories
HTCACHECLEAN_OPTIONS="-n"

View File

@ -47,6 +47,14 @@
mode: 0644
notify: zuul Reload apache2
- name: Copy htcacheclean config
copy:
src: apache-htcacheclean.default
dest: /etc/default/apache-htcacheclean
owner: root
group: root
mode: '0644'
- name: Install logging config
copy:
src: logging.conf