nextcloud / nextcloud/documentation

Slow uploads with HTTP/2

Open
#9,578 18 comments 17 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: install and update manual: admin performance 🚀
Dominant language
JavaScript
Stars
628
Forks
2.5k
Avg merge
2d 11h
Merged PRs (30d)
135

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
Summary

When HTTP/2 is enabled on the webserver, uploads are very slow, topping out at slightly over 1MByte/s, despite both client and server offering vastly more bandwidth. Once HTTP2 was disabled, upload speeds were improved by a factor of over x10.

All PHP/DB optimizations are in place, and more. The CPU load on server and client remains low, IO load on the DB and storage remains low. Issue is observed during large file uploads, so DB overhead isn't the issue.

This issue was observed by multiple people, e.g. here, here and here. It seems to affect both nginx and Apache.

Steps to reproduce
  1. Enable HTTP/2 on webserver
  2. Upload using a WebDAV client - this test used the Windows 10 client via a mapped network drive
  3. Get uploadin'
Expected behaviour

>10 Mbyte/s

Actual behaviour

1-2 Mbyte/s

Server configuration

Operating system: Debian Linux 10
Web server: Apache 2.4.38-3+deb10u4
Database: MariaDB 10.3.27-0+deb10u1
PHP version: PHP FPM-CGI 7.3.19-1~deb10u1
Nextcloud version: 19.0.7
Updated from an older Nextcloud/ownCloud or fresh install: Updated
Where did you install Nextcloud from: Included updater

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.5.0
  - activity: 2.12.1
  - calendar: 2.0.4
  - camerarawpreviews: 0.7.10
  - checksum: 0.4.5
  - cloud_federation_api: 1.2.0
  - comments: 1.9.0
  - contacts: 3.4.3
  - dav: 1.15.0
  - duplicatefinder: 0.0.4
  - federatedfilesharing: 1.9.0
  - federation: 1.9.0
  - files: 1.14.0
  - files_3d: 0.3.3
  - files_rightclick: 0.16.0
  - files_sharing: 1.11.0
  - files_trashbin: 1.9.0
  - files_versions: 1.12.0
  - logreader: 2.4.0
  - lookup_server_connector: 1.7.0
  - metadata: 0.12.0
  - nextcloud_announcements: 1.8.0
  - notes: 3.6.4
  - 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
  - text: 3.0.1
  - theming: 1.10.0
  - twofactor_backupcodes: 1.8.0
  - updatenotification: 1.9.0
  - viewer: 1.3.0
  - workflowengine: 2.1.0
Disabled:
  - admin_audit
  - contactsinteraction
  - encryption
  - files_external
  - files_pdfviewer
  - files_videoplayer
  - firstrunwizard
  - ransomware_protection
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "overwritewebroot": "\/",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "19.0.7.1",
        "knowledgebaseenabled": false,
        "apps_paths": [
            {
                "path": "\/var\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": true
            }
        ],
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "loglevel": 2,
        "mail_smtpmode": "sendmail",
        "theme": "",
        "maintenance": false,
        "trashbin_retention_obligation": "auto",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "session_lifetime": 86400,
        "mysql.utf8mb4": true,
        "updater.release.channel": "stable",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "preview_max_filesize_image": 100,
        "app_install_overwrite": [
            "checksum"
        ]
    }
}

Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no

Client configuration

Browser: -
Client software: Windows 10 WebClient service (Microsoft-WebDAV-MiniRedir/10.0.18363)
Operating system: Windows 10

Logs
Web server error log
Web server error log
no error logs during upload
Nextcloud log (data/nextcloud.log)
Nextcloud log
no nextcloud log during upload
Browser log
Browser log
not using a browser

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No project file or test is identified. Start by reproducing the reported upload-speed difference with HTTP/2 enabled versus disabled using Apache, the Windows WebDAV client, and Nextcloud 19.0.7, then trace whether the bottleneck is in the WebDAV upload path or server configuration. Done means identifying a reproducible cause and a documented or tested resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, mariadb, php
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.