Bug#423653: apache2.2-common: mod_disk_cache fills /var after etch upgrade
On Mon, 14 May 2007, Peter Samuelson wrote:
I am not sure if mod_disk_cache was enabled or not before the upgrade
to etch (from sarge), but it was certainly not using disk space in
the same way.
In the sarge packages, /etc/apache2/mods-available/proxy.load includes
four modules: mod_cache, mod_disk_cache, mod_proxy, mod_proxy_http.
These have been separated in the etch packages, so the upgrade
procedure checks to see whether you had mod_proxy enabled before, and
if so, it enables all 4 modules.
I do not know why the sarge version of mod_disk_cache did not fill up
your disks, unless it is due to the CacheSize configuration setting,
but the docs imply that that setting didn't actually work. (It has
since been removed from the module.)
As far as I could gather from looking at timestamps when I first noticed
the problem, the /var/cache/apache2/mod_disk_cache directory was first
created during or after the etch upgrade.
mod_disk_cache appears to be experimental
It was, in Apache 2.0. Etch ships with Apache 2.2; if you read
http://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html you will see
that it is no longer experimental.
Oops, apologies for that.
You'll also see that the developers chose not to implement the garbage
collection within the module, but as an external utility "htcacheclean"
which can either be run periodically from cron, or run as a daemon that
wakes itself up on occasion.
Right, that sounds reasonable.
Arguably we should be starting this daemon automatically. We don't,
currently, but unless you have a better idea, I think I will implement
this in /etc/init.d/apache2, with options in /etc/default/apache2 to
determine whether it is needed and how big the cache show be allowed to
That sounds reasonable. I don't know what a good default for the size
would be, though; to avoid causing trouble on small systems it would need
to be <100MB, but this may make the cache ineffective.