Start/Stop runlevels for "apache-htcacheclean"

Hi there,

this is explicit no nextcloud issue, than an apache issue. But as I don’t have an account on all the software specific forums, I hope I am allowed to ask for help here. At least it’s somehow related to nextcloud, where the webserver is effected ;).

I just upgraded apache2 to 2.4.25-3 and got the following warning:

insserv: warning: current start runlevel(s) (empty) of script apache-htcacheclean' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of scriptapache-htcacheclean’ overrides LSB defaults (0 1 6).

I made some research what all of this is about and found out that it’s about in which system state (runlevel, i.e. during reboot, standby etc.) the script is started and stoped. So it seems there is no system state, where apache-htcacheclean is started, if I understand it right? But I guess it would be good, as it is about cache cleanup and also default in some runlevels by the LSB.

  1. So first question is if I am right, that the script never runs on my system.
  2. Second question is, if it should run and on which runlevels, i.e. the defaults.
  3. Third question is how to change the start/stop runlevels for apache-htcacheclean.

I hope somebody can help :).

To close this:

  • htcacheclean is a tool that cleans the apache disk cache file, given a maximum file size, used if the cache_disk module is enabled: http://httpd.apache.org/docs/current/mod/mod_cache_disk.html
  • It can be run as daemon or as cron job, where daemon is default. /etc/default/apache-htcacheclean shows how it is run.
  • “#chkconfig --list” (if installed) lists in which system states each service is enabled. The system states/runlevels are defined here: http://www.uptimemadeeasy.com/linux/booting-changing-runlevels-and-configuring-linux-system-services/
  • In my case apache-htcacheclean runs as daemon, but the daemon is off for all system state. This makes somehow sense, because the cache_disk module is disabled anyway and the cache file size is and stays therefore zero. This also makes sense for my Raspberry Pi, as disk cache on sd card is not a good idea and memory caching (APCu + Redis) is enabled. I am just not sure if both caching systems are caching the same things. There was also “mod_mem_cache”, a memory caching module, available in apache 2.2, but not anymore in apache 2.4. Could be interesting to know, if there is any additional benefit by enabling mod_cache_disk on top of ACPu memory caching.