Incomplete Implementation of 'enable_previews' => false?

I am struggling with the performance of my nextcloud instance running on a small odroid n2+. It turns out, that mariadb-server is runnig at 100% CPU usage, when I am browsing my files in nextcloud via the browser.

For details on the configuration see:

Therefore I set ‘enable_previews’ => false in config.php and deleted all entries in oc_filecache table containing ‘appdata%/preview%’ and deleting all files and directories in /appdata_xxxx/preview.

After this preview files (.jpg, .jpeg, .png - files containing the preview bitmaps) are no longer created.

But the directories where these files are normally stored in (/appdata_xxxxxxx/preview/…) are still created. I also find these directories in the oc_filecache table., where they are killing the performance of the mariadb instance.

Why are the directories and corresponding database entries are still created even though the parameter tells the system not to do so?

There was a regression for exactly that problem which should be fixed meanwhile. Not sure if it made it into the last release, though

Hi,

We are dealing with two, related, issues here.

  1. Since 29 a blurhash is generated for each image to make the loading of photos a bit smoother. The blurhash is generated from the preview, and if there is no preview, it will be generated as well. That’s something we will improve, but it’s not done: [Bug]: Automatic (not on-demand) preview generation fills disk · Issue #45654 · nextcloud/server · GitHub

  2. That enable_previews = false does not disable the folder creation is not really new, but it becomes much more notable due to issue 1 and will be fixed with the upcoming 29.0.4: [Bug]: Disabling the preview does not stop the creation of the folder tree · Issue #45697 · nextcloud/server · GitHub.

2 Likes

thanks for this information.

Is there any chance to get the version where this fix is rolled out?

You mean early? Sure you can always manually patch the PR into your existing instance by following the docs: Patching Nextcloud — Nextcloud latest Administration Manual latest documentation