Issues synching external SMB storage on Windows clients

Nextcloud version (eg, 20.0.5): 26.0.2
Operating system and version (eg, Ubuntu 20.04): Alpine 3.18 container on Debian 10
Apache or nginx version (eg, Apache 2.4.25): nginx 1.24
PHP version (eg, 7.4): 8.2.7
High performance backend enabled: Yes
Redis enabled: Yes

The issue you are facing:

Our Samba server and Nextcloud run on the same server. I tried to setup a kind of hybrid where access to the share should both be possible via SMB and via Nextcloud. In order to achieve this I connected the share in two manners:

  • directly mount the folder into the Docker container and use external_storage to point to it
  • connect the folder via SMB in the external_storage app

In both cases the clients take forever to sync the external storage if they sync it at all. Mostly they just hang forever and the external storage is never synced blocking every other sync procedure on the client.

I increased DB memory usage and went through the server tuning guide but nothing seems to help.

Does anyone have a similiar setup in production? Are there any recommendations for getting this up and running?

Is this the first time you’ve seen this error? (Y/N): N

The output of your Nextcloud log in Admin > Logging:

Nothing in the logs apart from some random PROPFIND messages

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'datadirectory' => '/data',
  'instanceid' => 'someid',
  'passwordsalt' => 'somesalt',
  'secret' => 'supersecretsecreut',
  'trusted_domains' =>
  array (
    0 => 'cloud.example.com',
  ),
  'dbtype' => 'pgsql',
  'version' => '26.0.2.1',
  'overwrite.cli.url' => 'https://cloud.example.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'postgres',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'supersecretdbpasswort',
  'installed' => true,
  'trusted_proxies' =>
  array (
    0 => '172.16.0.0/12',
  ),
  'redis' =>
  array (
    'host' => 'nextcloud-redis',
    'port' => 6379,
    'timeout' => 1.0,
  ),
  'default_language' => 'de',
  'default_locale' => 'de_DE',
  'skeletondirectory' => '',
  'default_phone_region' => 'de',
  'maintenance' => false,
  'loglevel' => 0,
  'enable_previews' => false,
  'updater.release.channel' => 'stable',
  'upgrade.disable-web' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'cloud',
  'mail_domain' => 'example.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.example.com',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'cloud@example.com',
  'mail_smtppassword' => 'supersecretmailpassword',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' =>
  array (
    0 => 'admin',
    1 => 'SomeGroup',
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'app_install_overwrite' =>
  array (
    0 => 'gpxmotion',
    1 => 'googledocsredirect',
    2 => 'admin_notifications',
    3 => 'dropit',
    4 => 'file_upload_notification',
    5 => 'flowupload',
    6 => 'integration_jira',
    7 => 'cfg_share_links',
    8 => 'apporder',
    9 => 'facerecognition',
    10 => 'folderplayer',
  ),
  'memories.exiftool' => '/config/www/nextcloud/apps/memories/exiftool-bin/exiftool-amd64-musl',
  'memories.vod.path' => '/config/www/nextcloud/apps/memories/exiftool-bin/go-vod-amd64',
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
);

The output of your Apache/nginx/system log in /var/log/____:

sporadic timeout errors but like 1-20 per day:

2023/06/20 17:21:47 [error] 349#349: *1204359 upstream timed out (110: Operation timed out) while reading response header from upstream, client: x.x.x.x, server: _, request: "DELETE /remote.php/dav/files/username/path/on/external_storage/file.zip HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "cloud.example.com"
no errors in nextcloud.log