I have been using nextcloud for some years now without major problems. For some weeks I face the following problem: The system cron works fine for some days, then for some reason it suddenly stops working.
cron.log tells me that cron.php is still being executed, but nextcloud reports: “last cron x hours ago, somthing is wrong”. When i run the nextcloud cron.php as www-data manually no error is reported, but nextcloud still complains that cron is not working.
After some more time (days) nextcloud is suddenly in maintenance mode. at this point the only thing that works is restaring apache (although every other website etc works fine). Now nextcloud works again as expected including system cron. A few days later the cylce repeats…
Most probably I am just stupid and the fact that restarting apache temporarily solves the problem is curious, but i cannot find relevant hints in either the apache or php error logs.
Sorry for the long text, but perhaps someone can point me in the right direction…
Please check your Nextcloud log (either via Admin setttings->Logging or via data/nextcloud.log. Your Nextcloud cron job may be executing, but still failing within Nextcloud itself (i.e. one of the background jobs is generate a serious enough error).
Your Nextcloud log may have other clues that will help explain why an Apache restart is needed and, more importantly, why maintenance mode is kicking in somehow on its own.
ok: As expected it was my own stupidity: (a weekly backup cron-job filled up the disk temporarily causing the problems). Please ignore everything above…