Preview deletion not working properly

I’m still having problems with the automatic preview deletion after deleting files. Those problems were allegedly resolved regarding the following issues that have been closed:

The problems I’m having and how to reproduce them:

  • I’m using the Preview Generator App
  • My preview setup (This should probably not change anything):
occ config:app:set previewgenerator squareSizes --value="32 256"
occ config:app:set previewgenerator widthSizes --value="256 384"
occ config:app:set previewgenerator heightSizes --value="256"
occ config:system:set preview_max_x --value 2048
occ config:system:set preview_max_y --value 2048
occ config:system:set jpeg_quality --value 60
occ config:app:set preview jpeg_quality --value="60"
  • I’ve uploaded 71MB files
  • These files created about 9.2 MB preview data in my preview folder /media/data/nextcloud/appdata_oczbcw60kk8w/preview
  • After emptying the cloud (deleting all files and emptying the bin) no preview files have been removed, as the folder was still of size 9.2 MB
  • When I then re-uploaded the same data again another bunch of previews were generated which added up to a total of about 14MB
  • I deleted those files again: nothing changes. I didn’t change anything for a couple of hours. Then all of a sudden the total preview folder size shrank to 11MB
  • I’m oviously running ./occ preview:pre-generate after every step to ensure that all preview data is being generated. I executed ./occ preview:generate-all after the first upload.

I’m trying to understand what’s going on here as the numbers are not making any sense to me. Why is at first nothing changing after deleting the files? Why is significantly less preview data being generated when re-uploading the same files? Why does nextcloud suddenly (after multiple hours) delete a portion of those previews but not all of them? Why is there still 11M of previews left while not a single byte of data is on the cloud?

What I’m expecting: Nextcloud should automatically remove the preview data as soon as the actual data is removed. If nextcloud checks that periodically it should still be deterministic and there should be no preview data if all of the actual cloud data is deleted.

My setup:

  • Nextcloud 20, Nginx, on Raspberry Pi 4
  • Preview Generator App settings as mentioned above