Uploading files via WebDav with rclone is really slow

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.5
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian Trixie 13.5
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.67
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx proxy manager v2.13.3
  • PHP version (e.g, 8.3):
    • 8.4.22
  • Is this the first time you’ve seen this error? (Yes / No):
    • no
  • When did this problem seem to first start?
    • always been there
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • bare metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

When accessed via WebDav the performance is locked to 3.7 MB/s on large files. Since I use it to upload a backup from other servers this is just too slow (particularly a 18 GB db backup file). I have tuned my server quite a bit and with the Nextcloud client I get the full 1 Gbit/s I am limited to by the NIC. I am using an access token like suggested in other threads, but that didn’t yield any benefits.

I am also using the WebDav endpoint to backup files from my phone and with 2 large files uploading at the same time they also stumble upon this limit (uploadspeeds combined that is).

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

  1. configure a remote with rclone using the remote.php/dav endpoint

  2. try uploading a large file via rclone copy (I do not use any flags other than the one for showing the performance (-P)

Configuration

Nextcloud

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "serverid": 1,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "1": "***REMOVED SENSITIVE VALUE***",
            "2": "***REMOVED SENSITIVE VALUE***"
        },
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "33.0.5.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": true,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "debug": false,
        "theme": "",
        "maintenance": false,
        "has_rebuilt_cache": true,
        "allow_user_to_change_mail_address": "",
        "remember_login_cookie_lifetime": 1296000,
        "session_lifetime": 86400,
        "mysql.utf8mb4": true,
        "default_phone_region": "DE",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "app_install_overwrite": [
            "news",
            "camerarawpreviews",
            "richdocuments",
            "spreed",
            "impersonate",
            "deck",
            "maps"
        ],
        "bulkupload.enabled": false,
        "defaultapp": "files",
        "trashbin_retention_obligation": "30, 90",
        "memories.exiftool": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "maintenance_window_start": 4,
        "enabledPreviewProviders": [
            "OC\\Preview\\Movie",
            "OC\\Preview\\Image",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\TIFF"
        ],
        "memories.vod.disable": false,
        "memories.vod.vaapi": true,
        "memories.db.triggers.fcu": true,
        "memories.gis_type": 1,
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "ssl",
        "memories.vod.vaapi.low_power": true
    }
}

Apps

Enabled:
  - activity: 6.0.0
  - app_api: 33.0.0
  - audioplayer: 3.9.0
  - bruteforcesettings: 6.0.0
  - calendar: 6.5.0
  - camerarawpreviews: 1.1.1
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - collectives: 4.4.1
  - comments: 1.23.0
  - contacts: 8.7.0
  - contactsinteraction: 1.14.1
  - cookbook: 0.11.7
  - cospend: 4.0.2
  - dashboard: 7.13.0
  - dav: 1.36.0
  - deck: 1.17.3
  - drawio: 4.2.3
  - federatedfilesharing: 1.23.0
  - federation: 1.23.0
  - files: 2.5.0
  - files_downloadlimit: 5.1.0
  - files_pdfviewer: 6.0.0
  - files_reminders: 1.6.0
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - firstrunwizard: 6.0.0
  - forms: 5.3.2
  - impersonate: 4.0.0
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - mail: 5.9.3
  - memegen: 2.0.1
  - memories: 8.0.1
  - news: 28.6.0
  - nextcloud_announcements: 5.0.0
  - notes: 6.0.0
  - notifications: 6.0.0
  - notify_push: 1.3.3
  - oauth2: 1.21.0
  - password_policy: 5.0.0
  - photos: 6.0.0
  - previewgenerator: 5.13.0
  - privacy: 5.0.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - recognize: 11.0.1
  - recommendations: 6.0.0
  - related_resources: 4.0.0
  - richdocuments: 10.2.0
  - serverinfo: 5.0.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - side_menu: 5.3.0
  - spreed: 23.0.6
  - support: 5.0.0
  - survey_client: 5.0.0
  - systemtags: 1.23.0
  - tasks: 0.17.1
  - text: 7.0.1
  - theming: 2.8.0
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0
  - updatenotification: 1.23.0
  - user_status: 1.13.0
  - viewer: 6.0.0
  - weather_status: 1.13.0
  - webhook_listeners: 1.5.0
  - whiteboard: 1.5.9
  - workflowengine: 2.15.0
Disabled:
  - admin_audit: 1.23.0
  - encryption: 2.21.0
  - files_3dmodelviewer: 0.0.16 (installed 0.0.16)
  - files_external: 1.25.1 (installed 0.9.0)
  - files_mindmap: 0.0.34 (installed 0.0.33)
  - htmlviewer: 33.0.0 (installed 33.0.0)
  - maps: 1.7.1 (installed 1.7.1)
  - suspicious_login: 11.0.0 (installed 9.0.1)
  - testing: 1.23.0
  - threedviewer: 3.3.0 (installed 3.3.0)
  - twofactor_nextcloud_notification: 7.0.0
  - user_ldap: 1.24.0

Have you already tried to find a resolution for your issue by using the search function of this forum? I’ve found e.g. this discussion:

Additional hints how to optimize the upload performance can be found by using “nextcloud tune webdav upload performance” as search criteria.

I googled for this problem, but not in this forum directly. I will investigate my mariadb install, but as far as I know there is not as much to configure as on postgresql for example. However, I am already using redis for file locking, my scenario is maybe not best case, but far from worst case. I use mariadb exclusively for nextcloud and it is the heaviest service I run on that host. I have 64 GB of RAM in it, which appears to be utilized as well as can be and my IO is chiling at 14 % when uploading the file (CPU is also at 10-20%)

I tuned mariadb and my web interface is more snappy, which is great. I also looked at my opcache settings, but those seem fine and I still have the slow speed on my webdav endpoint, so these were not the bottlenecks