Groupfolders: huge "versions" directory

I’m new here, so first of all: Hi!

My webhoster (Germany, All-inkl) keeps sending me emails about reaching my webspace limit. When I check, it is always the same folder that has become ridiculously huge: /nextcloud/data/__groupfolders/versions/4/. It is a shared groupfolder that does NOT have large files in it but it is a working directory in which small files get saved very, very often (like several times a minute). So my bet is: there is a huge pile of (unnecessary) file versioning information.

I can manually clean it up with occ groupfolders:expire and occ groupfolders:trashbin:cleanup -f 4. But I was wondering if there was a more automated way to do this – or even a way to prevent this from happening at all.

Any recommendations? Greatly appreciated, thanks!

Nextcloud version (eg, 20.0.5): Nextcloud Hub II (23.0.8)
Operating system and version (eg, Ubuntu 20.04): Linux 5.4.0-125-generic #141-Ubuntu SMP Wed Aug 10 13:42:03 UTC 2022 x86_64
Apache or nginx version (eg, Apache 2.4.25): Apache (fpm-fcgi)
PHP version (eg, 7.4): 7.4.30

Is this the first time you’ve seen this error? No, this keeps happening every other week or so

Steps to replicate it:

  1. Use a groupfolder to often save a small file
  2. Keep doing 1. until hoster sends warning email

The output of your Nextcloud log in Admin > Logging:
(this logfile is huge – it seems like I have forgotten to recreate the /tmp folder after an Update. Is this needed?

The output of your config.php file in /path/to/nextcloud
(Which part is of interest? It seems like there is too much private information in here to post this.)

The output of your Apache/nginx/system log in /var/log/____:
(it is a shared hosting environment, I don’t have access to log files)

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Many errors of this kind:

[PHP] Fehler: opendir(/tmp): failed to open dir: Permission denied at /www/htdocs/w0147065/

GET /cron.php
from x.x.x.x at 2022-09-26T05:47:49+00:00

And a few of this type (but not about the directory in question):

[no app in context] Fehler: "Ach-Aufnahmen/64/64.rpp" is locked

PUT /remote.php/dav/files/[USERNAME]/Ach-Aufnahmen/64/64.rpp
from x.x.x.x by [USERNAME] at 2022-09-26T05:34:49+00:00

most likely you can address the problem by adopting your versions settings to more appropriate values:

You should set the group folder quota to a value which forces versions deletion but enough to keep changes between cron job runs and some room to grow…

1 Like

Thanks for the suggestion! Actually I have already tried that (so it would have made sense to post my config.php I guess) – but I just noticed that I might have made a mistake here by writing 2 instead of D2:

My config.php:

  'theme' => '',
  'loglevel' => 0,
  'trashbin_retention_obligation' => 'auto, 4',
  'versions_retention_obligation' => 'auto, 2',