Nextcloud not reachable anymore on apache after cronjob execution

as a newbie i installed nextcloud 10.0.0 on a banana pi (bananian 16.04.01) following the instructions from the nextcloud manual installation ( using apache2, mariadb, …). Everything was fine and I was able to connect to a test account on the server (using browser, iOS app and android App).

Now after one day of running this system (without interactions), nextcloud is not reachable anymore.

summary of the observations:

  • nextcloud installed in subdir http:///nextcloud
  • when trying to access http:// the Apache2 default page is shown
  • when trying to access http:///nextcloud the connection times out (no information given)

looking at the logs I found that the only thing happening was an apache stop/restart by cron

from apache logs:
[Sun Sep 11 06:25:07.218093 2016] [mpm_prefork:notice] [pid 14297] AH00171: Grac
eful restart requested, doing restart

apache script run by cron is

# run htcacheclean

set -e
set -u

type htcacheclean > /dev/null 2>&1 || exit 0
[ -e /etc/default/apache2 ]   || exit 0

# edit /etc/default/apache2 to change this

. /etc/default/apache2

[ "$HTCACHECLEAN_MODE" = "cron" ] || exit 0

[ "$HTCACHECLEAN_RUN" = "yes"	] || 
( [ "$HTCACHECLEAN_RUN" = "auto" ] && \
  [ -e /etc/apache2/mods-enabled/cache_disk.load ] )  || exit 0

htcacheclean ${HTCACHECLEAN_OPTIONS}	\

It seems that the script is freeing 300 MB RAM (also visible in the RAM consumption on the BPi [drop from 900MB to 600MB])

Questions are:
Could this cronjob be the root cause of the unavailability of my nextcloud instance or is there any other option that can lead to such server behaviour?

Furthermore the most important point is how to get nextcloud back online? (restarting the service (apache/mysql/php-fpm) did not solve the problem)


That is a standard script on debian for apache. Perhaps you changed something in your apache-config that took effect after the restart of apache? Check your apache-config. Regarding php-fpm, that is not the recommended installation method (it is mod_php). Some users reported issues with php-fpm but that could be related to a wrong configuration or other things (they often used admin-panels).