-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
After deleting image, the preview files remain forever #11574
Comments
GitMate.io thinks possibly related issues are #5558 (After deleting an (image) file, the preview files remain forever), #9523 (A file completely disappears after deleting from a group folder), #8241 (image), #2413 (Previews for empty files broken), and #3041 (Deleting a preview folder stops writing previews to disk). |
Can you check if you have an entry in your background jobs: OC\Preview\BackgroundCleanupJob? Also note that if you use ajax cron it will only delete 10 at a time (to not run into timeouts). |
I am using a Linux cron job, not Ajax cron. Sorry; how do I access OC\Preview\BackgroundCleanupJob? |
In the logs I found the following which is related to background Cleanup Jobs:
|
Q: What would actually happen if I just delete the entire preview folder? Would the preview generator understand that some needed previews are missing and recreate them? |
AH sorry. Check the oc_jobs table. No it won'tyou need to rescan your appdata folder with the occ command |
Hope I got that right: |
I can confirm this is still an issue in NC15.0.8 |
I have experienced the same issue in my installation of NextCloud on a nextcloudbox running nextcloudpi. I believe the problem lied with the preview generator app. When I realized the previews were eating up a huge amound of space I ended up deleting the app and manually removed the offending data. |
@lolaum since you are using NCP it is configured now to not make unnecessary previews so it should be faster and take up less space. Previews are generated one way or another (either by the pregen app or through browsing). Whatever the case may be when you delete the files the previews remain both in the previews folder and in the database and they are never pruned. |
@rullzer didn't we fixed this a few releases ago? |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue was the one that came up in searches, so someone please link to a more active issue if there is one. I had found that updating previews was taking a very long time, so I moved the appdata/preview folder to one side, rescanned my files, and then reran the preview generator. It took a while, but got there soon enough. The newly generated preview folder contains 61 MB of data. The one I moved contained 1.1 GB of data. So it seems that the preview folder bloats rather than keeping itself clear of previews of files that no longer exist. |
This issue is obviously related to #5558, which was closed for Nextcloud 12. I run Nextcloud 13.0.6 and the issue exists for me. Can anyone confirm?
Steps to reproduce
(5. Wait for trashbin_retention_obligation is exceeded)
Expected behaviour
The cached previews should be deleted at some point in time...
Actual behaviour
The cached previews are NOT deleted, in my case I have 13GB of preview images of different sizes
Server configuration
Operating system:
Debian
Web server:
Nginx
Database:
Maria
PHP version:
7.2
Nextcloud version: (see Nextcloud admin page)
13.0.6
Updated from an older Nextcloud/ownCloud or fresh install:
Updated; but previews were generated on NC 13
List of activated apps:
Nextcloud configuration:
The text was updated successfully, but these errors were encountered: