External Storage - Odd Behavior

I’ll preface my query to say that the following problem wasn’t an issue on Nextcloud 13.

Since upgrading to Nextcloud 14, under external storages, I have been unable to get a listing under a very large Music directory containing over 1200 sub-directories. When I attempt to do so, the screen hangs with a spinning wheel and nothing further. I have tried several different configurations of caching but none have resolved the issue. The external storage app is set to SFTP and is local to my server.

Also, I should confirm that I am able to access the directory through the Nextcloud app on my phone (just not from my desktop).

Any advice on how to resolve this issue is greatly appreciated.

cd /var/www/nextcloud

sudo -u www-data php occ files:scan --all

I run this daily thru cron to make sure external data is updated.
It may be slow depending system and files.

Thank you Oliver. Running the scan right now (this is going to take some time!). If it works, I’ll let you know and also add it to my crontab.

This didn’t work for me. I believe this is a bug in the latest version of the software as this doesn’t occur under Nextcloud 13. Thanks again for your suggestion.

Just keep in mind that “files:scan --all” will also scan all data in local Data folder - it will take much longer and will eat a lot of resources.

php occ files:scan --path="/USERNAME/files/Mount_Point"

as described in Automate OCC Filescan. This will only do rescan of specific path/mounting point.

Thanks @gas85 adjusted a daily scan accordingly :sunglasses:

Hi, I’m experiencing a similar behavior but in my case I have CIFS external storage configured, in my case the whole Nextcloud was hang, in my case the problem is an app called “Camera RAW preview” so you can see RAW images files directly from the cloud but it seems is not working very well because after disabling that app, everything works fine now.

@dedero It could be that App generating Previews and use your CPU a lot… First time when I fill up my server and run preview generator (not for RAW) it took around 5 days of 100% of CPU utilization to do the job…

@OliverV I also wrote a script to rescan all shares automatically: https://github.com/GAS85/nextcloud_scripts/blob/master/nextcloud-file-sync.sh it is also discussed in linked topic above. You can run it as cron. It is very helpful by 1+ share :grin:

1 Like

Thanks for the info, I was thinking the same as you suggest so I was reproducing the error with a top right away and the CPU didn’t go more than 5%, quite strange

It’s not really my topic but thanks for the file scan script!

@gas85 Thanks for your suggestion. I ran the command (also added -v to be sure that it was scanning my files). Everything appeared to be working but at the end of the process (overnight), I am still not able to view the files in the Nextcloud interface. Just a spinning wheel, nothing more.
At least I can see them though the Android Client. I’m fairly convinced that this issue is a bug in Nextcloud 14.

@voidoid3 I think the same. It must be a bug because I can see it everywhere but in the website.

Any update on this post? A solution at least yet?

@voidoid3 Hey I found the problem. Look for a file or folder with a funny name. In my case one of my folders had the “%” percentage sign. I removed it, and everything is perfect now.

@gacpac Your suggestion worked (many thanks)! I scanned my music library and removed (at least for now) all files and folders with the “%” symbol in the title. Though it worked, I regard this as a bug because having to remove the “%” could represent a substantial modification to some the album/song titles. So, still a bug but at least a temporary fix to the problem thanks to you :slightly_smiling_face:


I’m relatively new to NextCloud and I’m figuring out the troubleshooting part of it. I see it can break easily

Yep. For now, a labor of love!

Confirming that this problem has completely resolved itself since upgrading to Nextcloud 14.0.4.