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.
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:
SHOW TABLE STATUS FROM XYZ LIKE ‘oc_bookmarks_tree’\G
SHOW CREATE TABLE ‘XYZ’ .oc_bookmarks_tree`\G
SHOW TABLE STATUS FROM XYZ LIKE ‘oc_bookmarks_tags’\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
EXPLAIN /!50100 PARTITIONS/
SELECT b.id, 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_bookmarksb LEFT JOIN oc_bookmarks_treetree ON b.id =tree.id AND tree.type = ‘bookmark’ LEFT JOIN oc_bookmarks_tagst ON t.bookmark_id = b.id LEFT JOIN oc_bookmarks_treetr ON tr.id = b.id AND tr.type = ‘bookmark’ LEFT JOIN oc_bookmarks_shared_folderssf ON tr.parent_folder = sf.folder_id LEFT JOIN oc_bookmarks_treetr2 ON tr2.id = tr.parent_folder AND tr2.type = ‘folder’ LEFT JOIN oc_bookmarks_shared_folderssf2 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.id, 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, b.id ORDER BY b.lastmodified DESC, b.id 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