Of course, that should be part of the basis before any question
A lot of questions, but no clear answer … and for me also no solution.
What I could exclude
Cron.php hangs causing 100% cpu load
caused by bookmarks add-in. I dont’ use this
A new cron.php every 10 minutes and 100% CPU load
Cron.php creats high mysql load and doesn't finish
The cron.php tasks run for hours, constant CPU load, queries on oc_filecache
“cronjob never ends…” → my cronjos end every 5-7min sucessfully. No need to break it up.
no answer
Why so many cron logs & high cpu load
only one cron is runing, on my machine
[SOLVED] Occ command; PHP Fatal error, Allowed memory size of XXX bytes exhausted - #57 by crobarcro
commenting out memcache.local’ => ‘\OC\Memcache\APCu’, from /var/www/nextcloud/config/config.php, letting the cron job run
No improvement
What I (also) had tried without success
- Cron every 1min: It is executed every now and then. Mostly one start every 7-14min.
- Cron every 2-10min: same behavior as above.
- Cron >10min: it is always executed.
- Cron every 1-6h: same as above
The duration of an execution is always very same. Always 5-7min, no matter if every 1min or 6h.
docker exec -ti --user www-data nextcloud php /var/www/html/occ db:add-missing-indices
docker exec -ti --user www-data nextcloud php /var/www/html/occ db:add-missing-primary-keys
docker exec -ti --user www-data nextcloud php /var/www/html/occ db:convert-filecache-bigin
No improvement
docker exec --user www-data nextcloud php --define apc.enable_cli=1 -f /var/www/html/cron.php
No improvement
-d memory_limit=4G
it’s allredy set in compose file to PHP_MEMORY_LIMIT=2G
“slow_query_log” has no entries about queries that have run for more than 2s
I had stopped all (!) NC apps → no success.
What I had not yet tried so far
- Nextcloud Docker to fpm or fpm-alpine
- find unprintable characters in MySQL DB (I had read somewhere, I can’t find it anymore)
The solution is/was:
- Using MariaDB!
I created a dump from my mysql 8 db and loaded it into a mariadb 10 (both docker). Since then the problem no longer occurs: (since 48h)
MySQL:
MariaDB:
What I also noticed here:
- the NC24 mysql database (lib folder) was 4.2GB
- the NC25 mysql db is 16GB !
- the dump of this db is 2,4GB uncompressed
- the NC25 MariaDB is 4,1GB
Not much new data has been added to the database since NC24 (last about February) (about 6TB).
Since the switch to MariaDB I have not noticed any losses (of files, app data, …).
I will continue to follow the topic, but this one is closed (for now) for me.
If someone needs more information (about the 16GB mysql db) for debbugging reasons, just contact me.