Nextcloud slow upload speed (again)

Nextcloud slow upload speed (again)

Hey there,

I am quiet new to Nextcloud and all that server administration stuff.
I installed Ubuntu 20.04.1 LTS, nginx/1.18.0 and Nextcloud.
I set everything up and it seems to work. So far so good.

I tried to copy some files to my nextcloud and noticed the speed is very slow. It is between 50kB/s and 100kB/s.

I did already search the forum and the internet but didn’t found a solution for my problem.

I already tried to disable http2 but this didn’t work.
Can anybody help me?

Best Regards

Nextcloud version: 20.0.4
Operating system and version: Ubuntu 20.04.1 LTS
Apache or nginx version : nginx/1.18.0
PHP version: PHP7.4

The issue you are facing:
I tryed to copy some files to my nextcloud and noticed the upload speed is very slow. Its is between 50kB/s and 100kB/s.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:
Just upload a big file using the web interface.

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'ocn2d4a3f6fo',
  'passwordsalt' => 'HxZp9T6/j7Gz5iQoinqLc9yJ/x0lDy',
  'secret' => 'g/8uanEcXXVreqQpZ9TA5/eUUa9gBGAt/54ThXI9vIU/izI9',
  'trusted_domains' =>
  array (
    0 => 'AddressForRemoteAccess',
    1 => 'LocalServerName',
  'datadirectory' => '/mnt/drive/nextCloud',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dataBaseUser',
  'dbpassword' => 'password',
  'installed' => true,

The output of your Apache/nginx/system log in /var/log/____:

2021/01/18 18:49:10 [error] 751#751: *4758 recv() failed (104: Connection reset by peer) while r>
2021/01/18 18:49:10 [error] 751#751: *4909 recv() failed (104: Connection reset by peer) while r>

Provide your webserver/domain config files along with your php.ini.

her is my nginx config file - /etc/nginx/sites-enabeld:

#server {
#    listen 80;
#    listen [::]:80;
#    server_name AddressForRemoteAccess;
#    access_log  /var/log/nginx/nextcloud.access.log;
#    error_log   /var/log/nginx/nextcloud.error.log;
#    # enforce https
#    return 301 https://$server_name$request_uri;
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    access_log  /var/log/nginx/nextcloud.access.log;
    error_log   /var/log/nginx/nextcloud.error.log;
    server_name AddressForRemoteAccess LocalServerName;
    root /var/www/nextcloud;
    client_max_body_size 512M;
    fastcgi_buffers 64 4K;
    add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
    location = /.well-known/carddav {
      return 301 $scheme://$host/remote.php/dav;
    location = /.well-known/caldav {
      return 301 $scheme://$host/remote.php/dav;
   location / {
        rewrite ^ /index.php$uri;
    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
        return 404;
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
        return 404;
    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_pass      unix:/var/run/php/php7.4-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
        fastcgi_read_timeout 300;
    location ~ \.css {
    add_header  Content-Type    text/css;
    location ~ \.js {
    add_header  Content-Type    application/x-javascript;
    location ~ ^/(?:updater|ocs-provider)(?:$|/) {
        try_files $uri $uri/ =404;
        index index.php;
    location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
        try_files $uri /index.php$uri$is_args$args;
        access_log off;
    ssl_certificate /etc/letsencrypt/live/AddressForRemoteAccess/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/AddressForRemoteAccess/privkey.pem; # managed by Certbot

where do I find that php.ini?

I found the php.ini in /etc/php/7.4/fpm/php.ini
That file is more than 1000 lines long:

I found some warnings in the Administrator settings:

  • I added php module imagick
  • Added some indices for the database
  • And I tried to configure PHP-Memory-Cache by adding / uncomment this in the php.ini


This seems not to change the Warning. I sill got this:

I found two php.ini:

  • /etc/php/7.4/cli/php.ini
  • /etc/php/7.4/fpm/php.ini

The file transfer speed is still the same: very slow

I just noticed that the upload speed is much higher for the first one or to seconds. It looks like it is between 3 and 4 MB/s.

Am I the only one having trouble with the upload speed?

Hello, I have the same problem, same version as you have. Testing uploading over GE cable from ubuntu laptop by dragging a file to Nextcloud web interface.

I found this, scrolling there you find a chunck size setting

Thxs for the hint but I deleted my nextcloud installation and did a complete reinstallation with nextcloudPi.
This did all the configuration and it is running quite good now (besides some php errors that keep poping up in the logs).

Ok, what kind of transfer speeds you get? This would be interesting generally, to know what to expect and this should be published by developers as a reference.

Transfer speeds upload / download eg from these to/from Nextcloud (direct connection without ISP in between)
a) from Linux, Windows, MAC client
b) from Linux, Windows, MAC file browser
c) drag’n’drop (and via upload/download file if it differs) from Linux, Windows, MAC browsers Firefox, Chrome, Edge

In my case a ~ 2Mbit/a c ~ 150-200 Bytes/second, not kilo, mega or giga, but Bytes… Rsync from from Linux laptop to Nextcloud folder gave 21,6 Mbit/s for 1,2G file and 24,7 Mbit/s for 10G file.

At the moment, this is not usable at all. Web interface is running fine and totally without errors, but transfer speeds are just useless.

I mainly using the web interface from a windows PC.
I get around 2 to 3 MB/s to my nextcloud and about 1MB/s from my nextcloud.

Ok, thanks. These numbers are just hopeless, very far from 80-100 Mbit/s.