I've got folder with about 31GB (116 633 files and 29 052 folders). I selected i…t to sync with folder inside Nextcloud app.
On maaaany files there is Sabre\DAV\Exception\BadRequest error. Files with different size, and different types.
There are also other problems i have that i think are not very problematic so i will give them on the end of this report.
Proxy in client is disabled. Connection between PC and Nextcloud box is 1Gb ethernet on both sides. The PC (win10 with desktop client) got 64GB RAM with i7 9gen CPU, the Nextcloud (CentOS 8) box is 8GB RAM, with J4105 CPU, and two HDD's in softraid (raid 1).
Tried so far without success: Disable SELinux, PHP downgrade to 7.3 (REMI's repo), MariaDB downgrade from 10.4.13 (MariaDB repo) to older (from CentOS official repo).
Change Linux distro into CentOS 7, with PHP7.3, nginx 1.16.1, older database and still no success!
Removing redis from config is some kind of solution but it slowdowns everything a lot.
- All test above under fresh install.
My specific PHP/MariaDB configs that may have something to do.
/etc/php.ini:
memory_limit = 1024M
max_execution_time = 60
max_input_time = 120
post_max_size = 16384M
upload_max_filesize = 16384M
default_socket_timeout = 120
mysqli.cache_size = 2000
/etc/php-fpm.d/www.conf
pm.start_servers = 10
pm.max_children = 100
/etc/my.cnf.d/server.cnf
[server]
skip-name-resolve
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 90
query_cache_type = 1
query_cache_limit = 2M
query_cache_min_res_unit = 2k
query_cache_size = 64M
tmp_table_size= 64M
max_heap_table_size= 64M
slow-query-log = 1
slow-query-log-file = /var/log/mysql/slow.log
long_query_time = 1
[mysqld]
innodb_buffer_pool_size=1G
innodb_io_capacity=4000
### Steps to reproduce
1. Use desktop client for syncing from HDD to Nextcloud.
2. Find errors in activity inside desktop (Windows x64 app) and inside Nextcloud thru website inside Settings \ Logging.
### Expected behaviour
Find no errors while uploading files.
### Actual behaviour
Getting Sabre\DAV\Exception\BadRequest errors.
`
Sabre\DAV\Exception\BadRequest: Expected filesize of 35358091 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 14827520 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.
/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 154:OCA\DAV\Connector\Sabre\File->put()
/var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php - line 46:OCA\DAV\Connector\Sabre\Directory->createFile()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1104:OCA\DAV\Upload\UploadFolder->createFile()/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 527:Sabre\DAV\Server->createFile()
/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:Sabre\DAV\CorePlugin->httpPut()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 474:Sabre\DAV\Server->emit()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 251:Sabre\DAV\Server->invokeMethod()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 319:Sabre\DAV\Server->start()
/var/www/nextcloud/apps/dav/lib/Server.php - line 320:Sabre\DAV\Server->exec()
/var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:OCA\DAV\Server->exec()
/var/www/nextcloud/remote.php - line 167:require_once("/var/www/ne ... p")
`
Screenshots of Nextcloud:


Screenshots of Client:

### Server configuration
**Operating system:**
cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)
uname -a
Linux nextcloud 4.18.0-147.8.1.el8_1.x86_64 #1 SMP Thu Apr 9 13:49:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
**Web server:**'
nginx -V
nginx version: nginx/1.14.1
built by gcc 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)
built with OpenSSL 1.1.1 FIPS 11 Sep 2018 (running with OpenSSL 1.1.1c FIPS 28 May 2019)
TLS SNI support enabled
**Database:**
mariadb -V
mariadb Ver 15.1 Distrib 10.4.13-MariaDB, for Linux (x86_64) using readline 5.1
**PHP version:**
PHP-FPM connected with nginx thru socket
Version: 7.4.7
Memory Limit: 1 GB
Max Execution Time: 3600
Upload max size: 16 GB
**Nextcloud version:** (see Nextcloud admin page)
19.0.0.12
**Updated from an older Nextcloud/ownCloud or fresh install:**
Fresh install
**Where did you install Nextcloud from:**
nextcloud.com
**Signing status:**
No errors have been found.
**List of activated apps:**
sudo -u nginx php occ app:list
Enabled:
- accessibility: 1.5.0
- activity: 2.12.0
- bruteforcesettings: 1.6.0
- calendar: 2.0.3
- cloud_federation_api: 1.2.0
- comments: 1.9.0
- contacts: 3.3.0
- contactsinteraction: 1.0.0
- dav: 1.15.0
- federatedfilesharing: 1.9.0
- federation: 1.9.0
- files: 1.14.0
- files_external: 1.10.0
- files_pdfviewer: 1.8.0
- files_rightclick: 0.16.0
- files_sharing: 1.11.0
- files_trashbin: 1.9.0
- files_versions: 1.12.0
- files_videoplayer: 1.8.0
- firstrunwizard: 2.8.0
- groupfolders: 6.0.6
- logreader: 2.4.0
- lookup_server_connector: 1.7.0
- nextcloud_announcements: 1.8.0
- notifications: 2.7.0
- oauth2: 1.7.0
- password_policy: 1.9.1
- photos: 1.1.0
- privacy: 1.3.0
- provisioning_api: 1.9.0
- recommendations: 0.7.0
- serverinfo: 1.9.0
- settings: 1.1.0
- sharebymail: 1.9.0
- support: 1.2.1
- survey_client: 1.7.0
- systemtags: 1.9.0
- tasks: 0.13.1
- text: 3.0.1
- theming: 1.10.0
- twofactor_backupcodes: 1.8.0
- viewer: 1.3.0
- workflowengine: 2.1.0
Disabled:
- admin_audit
- encryption
- updatenotification
- user_ldap
**Nextcloud configuration:**
sudo -u nginx php occ config:list system
{
"system": {
"blacklisted_files": [],
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"nextcloud",
"127.0.0.1",
"192.168.50.2",
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "19.0.0.12",
"overwrite.cli.url": "http:\/\/nextcloud",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "1c_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"default_language": "pl",
"default_locale": "pl",
"memcache.local": "\\OC\\Memcache\\Redis",
"filelocking.enabled": true,
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"dbindex": 0,
"timeout": 600
},
"skeletondirectory": "core\/empty-default",
"maintenance": false
}
}
**Are you using external storage, if yes which one:** local/smb/sftp/...
There is smb plugin with attached storage, but it is not used for sync.
**Are you using encryption:**
no
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
no
### Client configuration
**Browser:**
Using Nextcloud desktop client.
**Operating system:**
Windows 10 Pro x64
### Logs
Server respond "423 Locked" on "PUT http://192.168.50.2/remote.php/dav/files/USERNAME/dire...
#### Web server error log
nginx error.log is empty.
#### Nextcloud log (data/nextcloud.log)
{"reqId":"aG0WKf6Jk3WBKZzcfG5l","level":3,"time":"2020-06-12T10:10:42+00:00","remoteAddr":"192.168.50.5","user":"USERNAME","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/USERNAME/2948563684/00000000","message":{"Exce
ption":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 35358091 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 14827520 bytes. Could either be a network problem on the sending side or a proble
m writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":154,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www
/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":46,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1104,"function":"cr
eateFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":527,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextclo
ud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"S
abre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Serv
er.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":320,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/
dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":167,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"F
ile":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":238,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"19.0.0.12"}
{"reqId":"aG0WKf6Jk3WBKZzcfG5l","level":4,"time":"2020-06-12T10:10:42+00:00","remoteAddr":"192.168.50.5","user":"USERNAME","app":"webdav","method":"PUT","url":"/remote.php/dav/uploads/USERNAME/2948563684/00000000","message":{"Exception":"Sab
re\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 35358091 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 14827520 bytes. Could either be a network problem on the sending side or a problem writing t
o the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":154,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/
apps/dav/lib/Upload/UploadFolder.php","line":46,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1104,"function":"createFile","
class":"OCA\\DAV\\Upload\\UploadFolder","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":527,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty
/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\
Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","li
ne":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":320,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo
/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":167,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/
www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":238,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"19.0.0.12"}
Other Problems. Both are with some GUI elements. The bell on the top right with notifications have always red dot informing thet there are some notifications, but when i click on it there are no (then dot disappears). After refresh, or click on any link inside nextcloud red dot is appearing there.


_Second problem is, when i start Nextcloud for first time, or click on my avatar -> About (About Nextcloud window). The first page is empty blue like on the screenshot._

Update1:
Solution for last problem with first run wizard is here: https://help.nextcloud.com/t/first-run-wizard-video-does-not-play-http-302/75281
Update2:
There is also a lot of errors:
session_start(): A session had already been started - ignoring at /var/www/nextcloud/lib/private/Session/Internal.php#209
But i find this is known problem for N19 and many people already reported that.
Update3:
it looks it may be problem with Redis cache. I'm making more tests,
Update4:
I changed 'memcache.local' => '\OC\Memcache\Redis', into 'memcache.local' => '\OC\Memcache\APCu'.
Deleting two lines in config.php fixed the problem:
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
I'll try to learn what is the problem, but i think for now i will leave it disabled so at least, it will work correctly.
Update5:
Fresh CentOS 7 install. Same problem.