The Basics
- Nextcloud Server version (e.g., 29.x.x):
31.0.8
- Operating system and version (e.g., Ubuntu 24.04):
Debian 13
- Web server and version (e.g, Apache 2.4.25):
Nginx 1.26.3
- PHP version (e.g, 8.3):
8.4
- Is this the first time you’ve seen this error? (Yes / No):
yes
- When did this problem seem to first start?
2 days ago
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Archive
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
Im using Foldersync Pro on Android to upload Photos and Videos because the Nextcloud Android App is unusable for me and randomly doesn’t upload some Photos. When using Foldersync, i get the errors like “Expected filesize of 10485760 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes”. Looking in the details, the source seems to be the FolderSync app.
Steps to replicate it (hint: details matter!):
- Install FolderSync Pro
- Create a Nextcloud specific Account in that app
- Setup Photo Sync Folderpair to sync DCIM folder
- Look at the logfiles in Nextcloud
Log entries
{"reqId":"pfs8kYGdrHuI9cZhrceJ","level":3,"time":"2025-08-25T13:41:31+02:00","remoteAddr":"88.68.3.xxx","user":"someusername","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/someusername/ce9ae812-4b3e-4bc3-918f-d9721a4d2f6c.tacitpart/0000000000000000-0000000010485759","message":"Erwartete Dateigröße von 10485760 bytes, aber 0 bytes gelesen (vom Nextcloud-Client) und geschrieben (in den Nextcloud-Speicher). Dies kann entweder ein Netzwerkproblem auf der sendenden Seite oder ein Problem beim Schreiben in den Speicher auf der Serverseite sein.","userAgent":"OkHttp","version":"31.0.8.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Erwartete Dateigröße von 10485760 bytes, aber 0 bytes gelesen (vom Nextcloud-Client) und geschrieben (in den Nextcloud-Speicher). Dies kann entweder ein Netzwerkproblem auf der sendenden Seite oder ein Problem beim Schreiben in den Speicher auf der Serverseite sein.","Code":0,"Trace":[{"file":"/mnt/stick/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":116,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/log/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":28,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/stick/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/stick/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/mnt/stick/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/mnt/stick/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/mnt/stick/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/mnt/stick/www/nextcloud/apps/dav/lib/Server.php","line":401,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/log/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":21,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/log/www/nextcloud/remote.php","line":145,"args":["/var/log/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/log/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":257,"message":"Erwartete Dateigröße von 10485760 bytes, aber 0 bytes gelesen (vom Nextcloud-Client) und geschrieben (in den Nextcloud-Speicher). Dies kann entweder ein Netzwerkproblem auf der sendenden Seite oder ein Problem beim Schreiben in den Speicher auf der Serverseite sein.","exception":[],"CustomMessage":"Erwartete Dateigröße von 10485760 bytes, aber 0 bytes gelesen (vom Nextcloud-Client) und geschrieben (in den Nextcloud-Speicher). Dies kann entweder ein Netzwerkproblem auf der sendenden Seite oder ein Problem beim Schreiben in den Speicher auf der Serverseite sein."},"id":"68ac4bec0e583"}
Configuration
Nextcloud
config.php
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"version": "31.0.8.1",
"overwrite.cli.url": ***REMOVED SENSITIVE VALUE***,
"dbtype": "mysql",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"installed": true,
"default_language": "de",
"default_timezone": "Europe\/Berlin",
"memories.db.triggers.fcu": true,
"memories.exiftool": "\/var\/log\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-aarch64-glibc",
"memories.vod.path": "\/var\/log\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-aarch64",
"memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
"memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
"memories.vod.disable": true,
"memories.video_default_quality": "-2",
"memories.vod.use_transpose": true,
"memories.vod.use_gop_size": true,
"memories.gis_type": 1,
"memories.index.mode": "3",
"memories.index.path.blacklist": "\\\/@(Recycle|eaDir|calibre)\\\/",
"memories.index.path": "\/Photos",
"enable_previews": true,
"enabledPreviewProviders": [
"OC\\Preview\\JPEG",
"OC\\Preview\\HEIC",
"OC\\Preview\\WEBP",
"OC\\Preview\\MP3",
"OC\\Preview\\Image",
"OC\\Preview\\Movie"
],
"preview_max_x": 1920,
"preview_max_y": 1920,
"preview_max_scale_factor": 1,
"jpeg_quality": 60,
"default_phone_region": "DE",
"mail_smtpmode": "sendmail",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": true,
"mail_smtpport": "587",
"debug": false,
"overwriteprotocol": "https",
"activity_expire_days": 14,
"auth.bruteforce.protection.enabled": true,
"ratelimit.protection.enabled": true,
"trashbin_retention_obligation": "auto, 30",
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"logtimezone": "Europe\/Berlin",
"loglevel": 2,
"remember_login_cookie_lifetime": 1296000,
"session_lifetime": 86400,
"session_keepalive": true,
"auto_logout": false,
"profile.enabled": false,
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"app_install_overwrite": [],
"twofactor_enforced": "false",
"twofactor_enforced_groups": [],
"twofactor_enforced_excluded_groups": [],
"defaultapp": "",
"forbidden_filename_characters": [
"<",
">",
":",
"\"",
"|",
"?",
"*",
"\\",
"\/"
],
"forbidden_filename_extensions": [
" ",
".",
".filepart",
".part"
],
"filesystem_check_changes": 0,
"forbidden_filename_basenames": [
"con",
"prn",
"aux",
"nul",
"com0",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"com\u00b9",
"com\u00b2",
"com\u00b3",
"lpt0",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"lpt\u00b9",
"lpt\u00b2",
"lpt\u00b3"
],
"maintenance_window_start": 1,
"maintenance": false,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"theme": "",
"max_chunk_size": 78643200,
"files.chunked_upload.max_size": 0
}
}
I have read https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#files-configure-max-chunk-size and set files.chunked_upload.max_size according to this documentation to 0. According to the documentation, this should disable the chunked upload completely. Values in nginx config and PHP are set so, that also 2GB files can be used. upload_max_filesize and post_max_size are at 2G in PHP and client_max_body_size in nginx the same. There are more than 2TB free space on /tmp and the target HDD. RAM is enough with 8GB.
I have no idea, where the limit with 10MB is set (10485760). This should be a old default value, but always raised to 100MB (104857600) in NC 31.x
