-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow uploads with HTTP/2 #9578
Comments
I see no improvement in disabling h2 and h2c. Apache 2.4.43 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This seems to be an overall issue, not a Nextcloud (only) issue. See here for more technical informations |
I could confirm that it is not a Nextcloud issue, but rather an issue with webservers ( nginx, apache ). Using the following configuration solved the upload bandwidth issue with nginx
|
For apache, add the |
TY zijiren233! This allowed the same improvement while keeping https end to end encryption. I did the following: #If your using SSLEngine on in your VirtualHost configuration for nextcloud make sure mod http2 is enabled sudo a2enmod http2 sudo nano /etc/apache2/mods-enabled/http2.conf #Add line H2WIndowSize 1048576
|
Just to add the pile of data, we went from 300KiB/s to 6MiB/s by setting client_max_body_size to 5M; A smaller buffer size did not max out the connection. |
Thanks @zijiren233 and @sentient-russ for the guidance. Also I disabled file chunking as it was causing severe delays in uploading Check Here Edit: |
So does anyone experience issues with downloads or only uploads? I am using haproxy in front of nginx/fpm. If I have enabled http2 for all connections downloads start of 50% and drop down to 300kB/s. With http2 terminated in haproxy and http/1.1 between haproxy and nginx the download maxes out my 50MBit/s connection. |
Could someone please open a PR over at https://github.com/nextcloud/documentation to document that this value needs to be adjusted when http2 is activated in Apache? Thanks! |
I'll move this to documentation so that it does not get lost |
reference: - nextcloud/documentation#9578 - https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/ BEFORE: Web and WebDav upload speed 18-20MB/s 路路路 client_max_body_size 0; client_body_buffer_size 0; 路路路 AFTER: Web and WebDav upload speed 60-80MB/s 路路路 client_max_body_size 0; client_body_buffer_size 512k; http2_body_preread_size 1048576; 路路路
How to use GitHub
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
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
List of activated apps:
App list
Nextcloud configuration:
Config report
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
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Browser log
The text was updated successfully, but these errors were encountered: