Massive performance problems - cron running forever

I use a hosting provider and Nextcloud has been running fine for the past couple of years. I received a notification from the hosting provider that I’m exceeding my allocated resources. I only use Nextcloud and its an installation for a family of 4 where I am pretty much the primary user. We use it to share files, calendar, and Instant upload to upload pictures taken on our mobile phones. On an average day maybe we add/update 10 files a day so a very small installation.

The cron job seems to be running constantly. Earlier today in the Nextcloud Admin/Overview page thre was an error that said that cron had been running for 2 hours ! Its set to run every hour. I maybe added a calendar entry and maybe added a new file to today. I also run a cron for preview generator which I’ve always suspected to be a resource hog. I’ve change the cron to run every 6 hours and preview generator to every 24 hrs in an effort to reduce the resource usage.

CPU usage is into the stratosphere and MySQL minutes even more so (4000 minutes/day how is that possible?)

I was running 21.1.1 (I think) until last week and this was happening. In an effort to fix it I’ve upgraded thru 22/x/x with no change. I even went to the beta channel (against my best judgement) and am now on Nextcloud Hub II (23.0.1 RC3) hoping whatever huge bug that is causing this has been fixed. Also ran the occ index updates which completed fine. I see no discussion in the community forums that seems to address this.

My hosting provider is threatening to kick me off their service unless this can be fixed. They suggested I updated to the latest version.

I’m moderately technically literate, enough to install/update and move around but not a dev so any help/diagnostics needs to be fairly step by step.

Any ideas/suggestions?

Did you check your Nextcloud logs and the output logs from the cron tasks?

I did but am not technical enough to know what I’m looking at/what to look for.

As a follow up I just received the following from my hosting provider: XYZ is my sanitized db name. For now I have disabled the bookmarks app to see if that helps. The browser bookmarks extension Floccus seemed to have problems with lots of bookmarks with lots of subfolders and kept creating duplicates so may be a combination of these things?

Our server monitoring systems indicate excessive MySQL server load persistently maintained by your hosting account for XYZ.

Most of the MySQL load is caused by the following query:

Exec time 44 14789s 202ms 221s 65s 159s 52s 57s

Lock time 5 12s 179us 2s 53ms 356ms 227ms 657us

Rows sent 0 226 1 1 1 1 0 1

Rows examine 37 70.93M 11.82k 645.05k 321.37k 509.78k 175.00k 399.43k

Rows affected 0 0 0 0 0 0 0 0

Bytes sent 0 457.92k 1.95k 2.38k 2.03k 2.06k 59.30 1.96k

Query size 0 293.67k 1.25k 1.67k 1.30k 1.33k 47.02 1.26k


Databases XYZ

Hosts localhost

Last errno 1260

Users XYZ

Query_time distribution













SHOW CREATE TABLE ‘XYZ’ .oc_bookmarks_tree`\G


SHOW CREATE TABLE XYZ.oc_bookmarks_tags\G

SHOW TABLE STATUS FROM XYZ LIKE ‘oc_bookmarks_shared_folders’\G

SHOW CREATE TABLE XYZ.oc_bookmarks_shared_folders\G


SELECT, b.url, b.title, b.description, b.lastmodified, b.added, b.clickcount, b.last_preview, b.available, b.archived_file, b.user_id, b.text_content, b.html_content, GROUP_CONCAT(tree.parent_folder) AS folders, GROUP_CONCAT(t.tag) AS tags FROM oc_bookmarks b LEFT JOIN oc_bookmarks_tree tree ON AND tree.type = ‘bookmark’ LEFT JOIN oc_bookmarks_tags t ON t.bookmark_id = LEFT JOIN oc_bookmarks_tree tr ON = AND tr.type = ‘bookmark’ LEFT JOIN oc_bookmarks_shared_folders sf ON tr.parent_folder = sf.folder_id LEFT JOIN oc_bookmarks_tree tr2 ON = tr.parent_folder AND tr2.type = ‘folder’ LEFT JOIN oc_bookmarks_shared_folders sf2 ON tr2.parent_folder = sf.folder_id WHERE (((b.user_id = ‘me’) OR (sf.user_id = ‘me’) OR (sf2.user_id = ‘me’)) AND (b.user_id IN (‘me’))) AND (b.url = ‘https:deleted url’) GROUP BY, b.url, b.title, b.description, b.lastmodified, b.added, b.clickcount, b.last_preview, b.available, b.archived_file, b.user_id, b.text_content, b.html_content, ORDER BY b.lastmodified DESC, ASC LIMIT 10\G

It appears that the Bookmarks App is making these queries. A possible solution would be to delete all bookmarks, as advised here:

If this action doesn’t reduce the MySQL usage, you can try completely disabling this app and also optimize the authentication procedure, as advised here:

I fixed this by deleting all of my bookmarks and disabling the Bookmarks app. Everything running fine now. Pity because I found the Bookmarks app and Floccus useful. May have to reassess using Nextcloud for my small/simple use case.

It is also possible to use Floccus without the Bookmarks app. Just add a new account and choose “XBEL-File in WebDAV share” instead of “Nextcloud Bookmarks”.

I just moved this topic to bookmark-subforum hoping that @marcelklehr would find it here some day and that your infos might help him (and you) finding out why this happened

this is a duplicate of Bookmarks App problem

1 Like

ok thanks for your hint! wasn’t aware of it.’

closing this thread in favor for the one mentioned above