Nextcloud 18 transfer speed slow

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version 18.0.3:
Operating system and version Ubuntu 18.04:
nginx version nginx/1.17.9
:
PHP version _7.4:

The issue you are facing:

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

Steps to replicate it:

1.server ubuntu 18.04 speedtest = Testing download speed…
Download: 233.71 Mbit/s
Testing upload speed…
Upload: 280.23 Mbit/s
2. upload and download file transfer nextcloud 52k/s
3.

The output of your Nextcloud log in Admin > Logging:

Testing download speed................................................................................
Download: 233.71 Mbit/s
Testing upload speed................................................................................................
Upload: 280.23 Mbit/s

Testing download speed…
Download: 233.71 Mbit/s
Testing upload speed…
Upload: 280.23 Mbit/s

Testing download speed................................................................................
Download: 233.71 Mbit/s
Testing upload speed................................................................................................
Upload: 280.23 Mbit/s

/var/www/nextcloud/config/config.php

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'tvde.go.ro',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.3.0',
  'overwrite.cli.url' => 'https://tvde.go.ro',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxxxxx',
'dbpassword' => 'xxxxxxxx',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'app_install_overwrite' =>
  array (
    0 => 'admin_notifications',
    1 => 'spreedme',
    2 => 'printer',
    3 => 'ojsxc',
    4 => 'social',
  ),
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'eu',
  'mail_domain' => 'localhost',
  'maintenance' => false,
  'mail_smtphost' => 'tvnl.eu',
  'mail_smtpport' => '25',
  'mail_smtpsecure' => 'tls',
);
/var/log/nginx/error.log`:
```
2020/04/12 07:39:03 [warn] 1783#1783: *11995 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/1/00/0000000001 while reading upstream, client: 84.81.67.156, server: tvde.go.ro, request: "GET /remote.php/dav/files/lstefan/Photo%20si%20video/Filmari/Eu%20cu%20fura%20lui%20mosu/20180316.mp4 HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "tvde.go.ro"
2020/04/12 07:39:05 [warn] 1783#1783: *11995 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/2/00/0000000002 while reading upstream, client: 84.81.67.156, server: tvde.go.ro, request: "GET /remote.php/dav/files/lstefan/Photo%20si%20video/Filmari/Eu%20cu%20fura%20lui%20mosu/20180316.mp4 HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "tvde.go.ro"

update log nextcloud
Sabre\DAV\Exception: Could not rename part file to final file

  1. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 156:OCA\DAV\Connector\Sabre\File->put()
  2. /var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php - line 47:OCA\DAV\Connector\Sabre\Directory->createFile()
  3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:OCA\DAV\Upload\UploadFolder->createFile()
  4. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525:Sabre\DAV\Server->createFile()
  5. <>Sabre\DAV\CorePlugin->httpPut()
  6. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:call_user_func_array()
  7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:Sabre\Event\EventEmitter->emit()
  8. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:Sabre\DAV\Server->invokeMethod()
  9. /var/www/nextcloud/apps/dav/lib/Server.php - line 319:Sabre\DAV\Server->exec()
  10. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:OCA\DAV\Server->exec()
  11. /var/www/nextcloud/remote.php - line 165:require_once("/var/www/ne … p")

There have been a few topics on this issue over the last months. Did you check some of these issues? Setting up redis locking cache, database cache settings, database indexes, …

where is that topic?

Hey. I have the same configuration except the database, it is PostgreSQL. And I, like you, have very slow loading, I read that there are problems in the architecture of nextcloud:
https://ownyourbits.com/2019/10/16/a-new-architecture-for-nextcloud/

Well, that is not the reason for the 52 kbit/s here.

Same issue for me on ubuntu 20.04 with nextcloud 20.0.7
I don’t know what could cause this error…
I’m not using http2 and I have reinstall ubuntu and I have restored my server on it.

Edit :
Finally, I have installed a new instance of nextcloud…

Hello, same issue here, 20.0.7 Ubuntu LTS 20.04 Nginx (laptop connected directly by GE cable to server) brand new fresh installation on Intel NUC 8G RAM, 1T SSD, only one user and no other services running on the same NUC.

In Windows and Linux clients from Chrome, Chromium, Firefox upload speed 150-200 Bytes per second, NOT kilo, mega or giga, but 150-200 Bytes/second. Installing Linux client and rsync between machine local folder to Nextcloud folder: 24,7 Mbit/s. Typical download from browser around 2-4 Mbit/s from Nextcloud. In admin view, there are no erros, redis set etc. Webinterface of Nextcloud is normal, not especially slow or fast.

Not related to this, but my fiber optic internet connection gives 80-100 Mbit/s to both directions. So basically any internet service is many times faster as this local Nextcloud. I have been looking after solutions and reading topics, but there are only shot in the dark- advices mitigating this issue, but Nextcloud’s lazy transfer speed seems to bother here and there.

In my opinion, as a file service user, file transfer should be the fastest in speed and the most reliable thing in the whole system. When comparing to Drive, Dropbox, it is obvious that can’t move to Nextcloud until this is solved. I hope so.

Hi @Infopal,
I have tried something and I discovered something strange. when I set a value other 0 in this command:
sudo -u www-data php occ config:app:set files max_chunk_size --value 0
I have 300 bytes/seconde of uploads but when 0 is used i have 11 MB/s of uploads ( max upload that I can have because i used a 100 mb/s switch)

Hello Mageunic, thank you and good to hear that it worked. In my case no effect. I found the same hint from this topic

@Infopal maybe you need to delete cookies and refresh the web page

So this is the upload via browser, right? What is the download speed? If it is just the upload, it could be related to the temporary folder, that it is very small, wrong permissions etc.

If you use native webdav, e.g. with WinSCP? Same problem?

There is something basic not working right, did you check the logs?

https://docs.nextcloud.com/server/20/admin_manual/issues/general_troubleshooting.html

Thank you for your answer, it took a while me to get back on this.

In Linux download: 1) I tested download of 10G test file from Nextcloud via Firefox browser. Download speed starts with 80 Mbit/s and drops to 5-6 Mbit/s. This download is in GE local network with HP enterprise switch and Watchguard firewall and no internet connection in between. 2) From Nextcloud directory in Nautilus (or what is the default file browser in Ubuntu), copy starts 106 Mbit/s and drops to 82 Mbit/s, but transfer is stable and works well.

In Linux upload: 1) From local folder to Nextcloud via Firefox, upload speed 120 B/s, so this is useless 2) Nautilus file browser, to Nextcloud folder from local folder copy over 100 Mbit/s, works well

Update 12-3-2021: I checked this tmp directory thing and enabled logging, no success.