External storage seems to be unstable and large uploads fail

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud Hub 26 Spring (35.0.1)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Docker container on Ubuntu 26.04.1 aarch64
  • Web server and version (e.g, Apache 2.4.25):
    • where do I find this info?
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx 1.31.6
  • PHP version (e.g, 8.3):
    • 8.5.11
  • Is this the first time you’ve seen this error? (Yes / No):
    • no
  • When did this problem seem to first start?
    • the first time I tried an upload to the external storage
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • docker
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

It seems that uploading a large enough directory to the external storage fails: a considerable amount of files are transferred at the beginning, then it starts failing, and files that follow all fail. The same does not seem to happen if I upload to the regular nextcloud storage.

The external storage is simply a local directory, on the same hard disk, mounted as a volume in the docker container.

It seems like the external storage disconnected: but can local directory disconnect?

Steps to replicate it (hint: details matter!):

  1. Create the external storage setup (local directory).

  2. Upload a “large” directory from the web interface (but also happens with the Android client).

  3. Wait a bit: many files a transferred properly but, at a certain point, it starts failing. This is not 100% deterministic, but I can reproduce pretty quickly.

Keep in mind that this is a slow aarch64 device.

Log entries

Nextcloud

I reproduced the problem several times, and I could generate failure logs. However, it seems I could generate different types of errors. I provide a few examples, but please note that the same error is typically replicated multiple times for each file that fails and the output is huge. I try to provide only single lines here:

[...]
{"reqId":"ifU0id6ODOBmHAVLOWBh","level":3,"time":"2026-10-07T19:40:05+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/luca/albums/Camera_20250101/20241231_214040.jpg","scriptName":"/remote.php","message":"File with id "209749" has not been found.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.0.0 Safari/537.36","version":"35.0.1.1","exception":{"Exception":"OCP\Files\NotFoundException","Message":"File with id "209749" has not been found.","Code":0,"Trace":[{"file":"/var/www/html/apps/activity/lib/FilesHooks.php","line":683,"function":"getPath","class":"OC\Files\View","type":"->","args":[209749]},{"file":"/var/www/html/apps/activity/lib/FilesHooks.php","line":150,"function":"getSourcePathAndOwner","class":"OCA\Activity\FilesHooks","type":"->","args":["/albums/Camera_20250101/20241231_214040.jpg"]},{"file":"/var/www/html/apps/activity/lib/FilesHooks.php","line":88,"function":"addNotificationsForFileAction","class":"OCA\Activity\FilesHooks","type":"->","args":["/albums/Camera_20250101/20241231_214040.jpg","file_created","created_self","created_by"]},{"file":"/var/www/html/apps/activity/lib/FilesHooksStatic.php","line":24,"function":"fileCreate","class":"OCA\Activity\FilesHooks","type":"->","args":["/albums/Camera_20250101/20241231_214040.jpg"]},{"file":"/var/www/html/lib/private/legacy/OC_Hook.php","line":87,"function":"fileCreate","class":"OCA\Activity\FilesHooksStatic","type":"::","args":[{"path":"/albums/Camera_20250101/20241231_214040.jpg"}]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":465,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","post_create",{"path":"/albums/Camera_20250101/20241231_214040.jpg"}]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":408,"function":"emitPostHooks","class":"OCA\DAV\Connector\Sabre\File","type":"->","args":[false]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":352,"function":"finalizeUpload","class":"OCA\DAV\Connector\Sabre\File","type":"->","args":[{"class":"OCA\Files_Trashbin\Storage","cache":{"class":"OC\Files\Cache\Cache"},"scanner":{"class":"OC\Files\Cache\Scanner"},"watcher":"*** sensitive parameters replaced ","propagator":{"class":"OC\Files\Cache\Propagator"},"updater":{"class":"OC\Files\Cache\Updater"}},"Camera_20250101/20241231_214040.jpg",false,{"class":"OC\Files\View"}]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":129,"function":"put","class":"OCA\DAV\Connector\Sabre\File","type":"->","args":[" sensitive parameters replaced "]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\DAV\Connector\Sabre\Directory","type":"->","args":[" sensitive parameters replaced "]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\DAV\Server","type":"->","args":[" sensitive parameters replaced "]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\DAV\CorePlugin","type":"->","args":[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\DAV\Server","type":"->","args":["method:PUT",[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":216,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->","args":[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":436,"function":"start","class":"OCA\DAV\Connector\Sabre\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":25,"function":"exec","class":"OCA\DAV\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":158,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require"},{"file":"/var/www/html/lib/OC.php","line":1397,"function":"{closure:/var/www/html/remote.php:102}","args":[" sensitive parameters replaced "]},{"file":"/var/www/html/remote.php","line":102,"function":"handleRequests","class":"OC","type":"::","args":[{"class":"Closure"}]}],"File":"/var/www/html/lib/private/Files/View.php","Line":1870,"message":"File with id "209749" has not been found.","CustomMessage":"File with id "209749" has not been found."}}
[...]

Another log I found:

[...]
{"reqId":"twJVpErceBBUhde5LIcP","level":3,"time":"2026-10-07T21:50:13+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/luca/web-file-upload-407e225fce98a6c4/14","scriptName":"/remote.php","message":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 15646720 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.0.0 Safari/537.36","version":"35.0.1.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 15646720 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":129,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Upload/UploadFolder.php","line":33,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":216,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":436,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":25,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":158,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require"},{"file":"/var/www/html/lib/OC.php","line":1397,"function":"{closure:/var/www/html/remote.php:102}","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/remote.php","line":102,"function":"handleRequests","class":"OC","type":"::","args":[{"__class__":"Closure"}]}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":276,"message":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 15646720 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","CustomMessage":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 15646720 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."}}
[...]

In another case, instead, files seemed to be properly copied (no error is shown), but then I could not navigate in the external storage:

{"reqId":"vvoy8E5Pg4VFy0MySz08","level":1,"time":"2026-10-09T22:30:43+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/luca/albums/","scriptName":"/remote.php","message":"The app config key dav/enableCalendarFederation is not defined in the config lexicon","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36","version":"35.0.1.1","data":[]}
{"reqId":"vvoy8E5Pg4VFy0MySz08","level":1,"time":"2026-10-09T22:30:43+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/luca/albums/","scriptName":"/remote.php","message":"The app config key dav/sendInvitations is not defined in the config lexicon","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36","version":"35.0.1.1","data":[]}
{"reqId":"vvoy8E5Pg4VFy0MySz08","level":1,"time":"2026-10-09T22:30:43+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/luca/albums/","scriptName":"/remote.php","message":"Uncaught exception","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36","version":"35.0.1.1","exception":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"File with name /albums could not be located","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":86,"function":"getNodeForPath","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["albums"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":971,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files/luca/albums"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1664,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["files/luca/albums",["{DAV:}getcontentlength","{DAV:}getcontenttype","{DAV:}getetag","{DAV:}getlastmodified","{DAV:}creationdate","And 34 more entries, set log level to debug to see all entries"],1]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1649,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\Xml\\Writer","elementMap":[],"contextUri":"/remote.php/dav/","namespaceMap":{"DAV:":"d","http://sabredav.org/ns":"s","http://owncloud.org/ns":"oc","http://nextcloud.org/ns":"nc"},"classMap":[]},{"__class__":"Generator"},false]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPFIND",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":216,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":436,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":25,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":158,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require"},{"file":"/var/www/html/lib/OC.php","line":1397,"function":"{closure:/var/www/html/remote.php:102}","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/remote.php","line":102,"function":"handleRequests","class":"OC","type":"::","args":[{"__class__":"Closure"}]}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","Line":541,"message":"Uncaught exception","CustomMessage":"Uncaught exception"}}
{"reqId":"Lpb01W16EpG24jOhf9HB","level":1,"time":"2026-10-09T22:30:52+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/luca/albums/","scriptName":"/remote.php","message":"The app config key dav/enableCalendarFederation is not defined in the config lexicon","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36","version":"35.0.1.1","data":[]}
{"reqId":"Lpb01W16EpG24jOhf9HB","level":1,"time":"2026-10-09T22:30:52+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/luca/albums/","scriptName":"/remote.php","message":"The app config key dav/sendInvitations is not defined in the config lexicon","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36","version":"35.0.1.1","data":[]}
{"reqId":"Lpb01W16EpG24jOhf9HB","level":1,"time":"2026-10-09T22:30:52+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/luca/albums/","scriptName":"/remote.php","message":"Uncaught exception","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36","version":"35.0.1.1","exception":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"File with name /albums could not be located","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":86,"function":"getNodeForPath","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["albums"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":971,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files/luca/albums"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1664,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["files/luca/albums",["{DAV:}getcontentlength","{DAV:}getcontenttype","{DAV:}getetag","{DAV:}getlastmodified","{DAV:}creationdate","And 34 more entries, set log level to debug to see all entries"],1]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1649,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\Xml\\Writer","elementMap":[],"contextUri":"/remote.php/dav/","namespaceMap":{"DAV:":"d","http://sabredav.org/ns":"s","http://owncloud.org/ns":"oc","http://nextcloud.org/ns":"nc"},"classMap":[]},{"__class__":"Generator"},false]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPFIND",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":216,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":436,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":25,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":158,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require"},{"file":"/var/www/html/lib/OC.php","line":1397,"function":"{closure:/var/www/html/remote.php:102}","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/remote.php","line":102,"function":"handleRequests","class":"OC","type":"::","args":[{"__class__":"Closure"}]}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","Line":541,"message":"Uncaught exception","CustomMessage":"Uncaught exception"}}

After a minute, the external storage is available again.

Not sure if this is related, but in the logs I always have hundreds of errors from Nextcloud Memories on the same external storage:

Failed to index folder /luca/files/albums: Local storage path does not exist "/albums/"

Web Browser

I doubt this is related to the web interface. Other clients show the same behavior.

Web server / Reverse Proxy

The reverse proxy shows 200 until the transfer works, then it starts with 404. In some cases I see 499.

Configuration

Nextcloud

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "..."
        ],
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/...",
        "overwriteprotocol": "https",
        "dbtype": "mysql",
        "version": "35.0.1.1",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "logfile": "\/var\/log\/nextcloud.log",
        "loglevel": 1,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "updater.release.channel": "stable",
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/html\/apps\/memories\/bin-ext\/exiftool-aarch64-glibc",
        "memories.vod.path": "\/var\/www\/html\/apps\/memories\/bin-ext\/go-vod-aarch64",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": false,
                "verify_peer": true,
                "verify_peer_name": true
            }
        },
        "config_preset": 2,
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": true,
        "mail_smtpport": "587",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin",
            "guest_app"
        ],
        "twofactor_enforced_excluded_groups": [],
        "mysql.utf8mb4": true,
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "enable_previews": true,
        "preview_concurrency_new": 1,
        "preview_concurrency_all": 2,
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\Movie"
        ],
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "preview_max_memory": 500,
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "app_install_overwrite": [
            "news"
        ]
    }
}

Any idea why external storage seems to be unstable?

Thanks!

What do you see when you run dmesg -Tw --follow-new while reproducing the problem?

I guess you mean from the host. No log is shown whatsoever.

On the other hand, I got many logs like this in nextcloud.log:

{"reqId":"JN9UAyPxRAJFkrc6sv0C","level":3,"time":"2026-10-10T14:15:21+00:00","remoteAddr":"192.168.0.1","user":"luca","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/luca/web-file-upload-46a5e92d744cdd00/3","scriptName":"/remote.php","message":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 2170880 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36","version":"35.0.1.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 2170880 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":129,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/Upload/UploadFolder.php","line":33,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Server.php","line":216,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":436,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":25,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":158,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require"},{"file":"/var/www/html/lib/OC.php","line":1397,"function":"{closure:/var/www/html/remote.php:102}","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/remote.php","line":102,"function":"handleRequests","class":"OC","type":"::","args":[{"__class__":"Closure"}]}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":276,"message":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 2170880 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","CustomMessage":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 2170880 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."}}

To be honest, I have no idea :sweat_smile:. Unless anyone else here has a great idea:

While the problem is occurring, can you read from or write to the external device via the console/SSH (not via Nextcloud)? Is that a HDD, SSD or an SD card? Have you checked the SMART values? Because maybe the storage device itself is just broken.

SMART check for Debian, but I assume it works the same way for Ubuntu:

apt install smartmontools

# Request a new short test. The test is executed in the background.
smartctl -t short /dev/<device>

# Wait a few minutes. Afterwards you can view the last self test.
smartctl -H /dev/sda/<device>

Have you already swapped the USB or SATA cable?

I probably forgot a detail: the directory is on the same physical hard disk of the nextcloud installation. So, if the disk was malfunctioning, everything should be. Nextcloud and this “external storage” reside on the same USB disk. Which is also the disk where the OS boots. I only have one hard disk, nothing more.

Still, to upload large directories to the external storage, I need to upload to regular nextcloud storage and then move.

I reported the issue but it was a configuration error: [Bug]: external storage unstable with large uploads · Issue #65595 · nextcloud/server · GitHub .

I configured cron in a separate container. Unfortunately, I forgot to provide the volume to the cron container. That was the source of the errors.

Thanks for helping!