Hello Nextcloud Community,
I’m encountering an issue with delayed thumbnail generation for photos added via SMB and stored in an externally mounted storage directory that is mounted & accessed via Nextcloud. Despite several attempts to troubleshoot and correct the problem, thumbnails for newly added photos either take a very long time to appear or don’t show up at all without manual intervention (basically me tinkering around with all the commands i can think of, refreshing things, logging out/in etc. Eventually the photo MIGHT show up, it might not).
Environment:
Nextcloud version: 28.0.5.1
External Storage: Mounted at /mnt/cavern
Access Method: SMB (Samba) on Linux
Server OS: Truenas, FreeBSD
Web server: Caddy v2.6.4
PHP version: PHP 8.1.17
Configuration:
External storage is configured through Nextcloud with settings to check for changes "Every time accessed."
What I’ve Tried:
I tried both Photos app and Memories app
Manual Scanning:
I've used the occ files:scan command for specific paths and the entire external storage, but it does not recognize new files immediately, if at all.
Example command: sudo -u www php /usr/local/www/nextcloud/occ files:scan --path="admin/files/cavern"
Thumbnail Generation:
Attempted to force thumbnail generation using occ preview:generate-all, specifically targeting new photo directories.
The logs show the commands execute but do not lead to immediate thumbnail availability.
Log Analysis:
Checked nextcloud.log for errors. I see no errors, it never actually mentions the file/s in question.
Permissions and Cache:
Ensured that file permissions are correct and tried clearing both Nextcloud and Redis caches.
Restarted the web server post-configuration changes.
All the commands i have tried:
su -m www -c 'php /usr/local/www/nextcloud/occ maintenance:repair'
su -m www -c 'php /usr/local/www/nextcloud/occ preview:generate-all'
su -m www -c 'php /usr/local/www/nextcloud/occ files:cleanup'
su -m www -c 'php /usr/local/www/nextcloud/occ preview:generate-all --path="admin/files/cavern"'
su -m www -c 'php /usr/local/www/nextcloud/occ files:scan --path="admin/files/cavern"'
Despite these efforts, the issue persists. Thumbnails for new images either don’t generate or take days to appear in the Nextcloud interface. I’m looking for insights or suggestions on how to ensure that thumbnails are generated more reliably and quickly after new files are added to the external storage.
Has anyone else experienced similar issues, or does anyone have recommendations on how to troubleshoot this further? Any help or guidance would be greatly appreciated!
Thank you!