-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preview directory in appdata_xxxx has grown over 120GB of Total size #45405
Comments
Yes. It runs hourly: https://github.com/nextcloud/server/blob/master/lib/private/Preview/BackgroundCleanupJob.php Are you getting any errors in your logs like perhaps was reported in #42540?
There is no single command that does this currently. Though this would be a reasonable enhancement. |
The job mentioned above will only clean previews of deleted files. There is no mechanism for deleting previews of old files. |
@joshtrichards - no - as far i see i do not have those or some of those errors mentioned in #42540 i analysed how many of directories i've got in the preview folder for every year: [root@server ~]# grep ' 2010' /tmp/file_list_of_preview_dir|wc -l so - i suppose the issue began on 2019/2020 within an earlier version of nextcloud I did count all image files [jpg/jpeg/png/gif/bmp/tiff/svg] for all users : Totally 313 GB of used space for all images - Nextcloud Preview will use 38% of space of them ! That means a manual (controlled by the cloud admin) mechanism for cleanup preview space is urgently needed. |
Please elaborate on the issue, what did you observe, what do you think is not right, what is an obsolete preview? The expected behavior is: Previews are generated for supported file types. If the source file is deleted, the previews are removed as well. We don't track the last access for files, and therefore cannot know when a preview was accessed the last time. |
thanks Daniel for those specific questions. obsolete - preview files, where no co-existing image is existing Yes, that's my view of things too: "If the source file is deleted, the previews are removed as well." It would be nice to have a way to find out if files exist for existing previews, something like this:
It would also be good, if the cloud admin could set the maximum size for the preview folder (so that the system automatically deletes the previews, that have not been used for the longest time - similar to what happens with the recycle bin). Do you need a feature request for this or do you think this is “useless” :-) |
Please also note that the ratio is not 1 preview per image. So, 38% is not a very big number IMO. See if needed: server/config/config.sample.php Lines 1195 to 1347 in 54afea4
And https://github.com/nextcloud/previewgenerator (specially the "I don't want to generate all the preview sizes" part). |
thx @solracsf - yes, i'm aware about the ratio (not 1 preview per image). May this could come in place to export the cloud preview to external (interim) storage ==>
|
No, this will only replace the preview provider not the storage. Imaginary is an external service that offers great performance and a wide variety of supported preview formats. It will not store your previews. Instead, it will process them on the fly and send them back to Nextcloud to be stored. |
Thx @st3iny / Richard for this explanation :-) |
Bug description
preview directory in appdata_xxxx has grown over 120GB of Total size
Steps to reproduce
Expected behavior
There should be a mechanism where the old, obsolete and/or long unused previews are automatically deleted.
An admin should also be able to perform such an operation manually.
QUESTION:
1 - Is there such an automatic mechanism ?
2 - Is there a manual mechanism ?
I know, i could remove the oldest previews in the preview folder, run a fresh "occ files:scan-app-data" afterwards.
But i think there must be a more proper, stable way to do that !?
Installation method
Community Web installer on a VPS or web space
Nextcloud Server version
27
Operating system
RHEL/CentOS
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 22.1 to 22.2)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
No response
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: