External storage SMB slow

Samba mount is super slow, files not synced. Is nextcloud reading files from sql database instead of directly for smb mounts?
If I set “check for changes” → “once on direct access” nextcloud will work super slow.

Why nextcloud doesn’t read directories directly and use sql only for searches etc…?

I cannot test this my self, since I don’t use External Storage, but I did a quick search and found this post, which brought me to the following links:

From the Nextcloud docs:

https://docs.nextcloud.com/server/stable/admin_manual/configuration_files/external_storage/smb.html

Note
For improved reliability and performance, we recommended installing libsmbclient-php, a native PHP module for connecting to SMB servers.

Related discussion on GitHub:

https://github.com/nextcloud/server/issues/6865

Conclussion:

As far as I understand it, you need to install the following packages on your server:

smbclient php-smbclient

Note: The names of the packages are referring to Debian / Ubuntu. If you are using another distribution they may be named differently. If your distribution doesn’t provide a pre-built package of php-smbclinet you can try compile it yourself… GitHub - eduardok/libsmbclient-php: smbclient's extension for PHP

You’re right. It had something to do with php. I installed php-smbclient, then commented out ;extension=smbclient.so in php.ini

Then I changed crontab:
*/5 * * * * php -f /var/www/nextcloud/cron.php --define apc.enable_cli=1
I added --define apc.enable_cli=1 to crontab because even though crontab was running, nextcloud said it wasn’t updated. So for folders size it was saying “Pending”. Now it updated the folders and it works fast again.

However I still think that nextcloud should read contents directly from samba and then update sql database in the background. I don’t know what was doing before…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.