Nextcloud file synchronization kills internet

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 (eg, 12.0.2): 15.0.10
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.29
PHP version (eg, 7.1): 7.2

The issue you are facing:

Whenever file synchronization takes place (even if the files are really small <1mb) the upload starts slow at something like 120kb/s and goes down further, after a couple of seconds the whole internet is ‘overloaded’ and the Wifi drops. I can’t connect to any websites from any machine on the same network whatsoever. It’s like whenever file synchronization takes place it overloads the whole bandwidth. Even though I never have any complaints about the network on any other occasion. I can download games from steam with 12mb/s easily for hours straight and not have a single problem.

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

Steps to replicate it:

  1. Put file in any folder
  2. Start synchronization
  3. Watch internet drop

The output of your Nextcloud log in Admin > Logging:

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: expected filesize 7432311 got 1212416 at <<closure>>

0. /snap/nextcloud/14827/htdocs/apps/dav/lib/Connector/Sabre/Directory.php line 156
   put(null)
1. /snap/nextcloud/14827/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
   createFile("04 Crime Pays.mp3", null)
2. /snap/nextcloud/14827/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
   createFile("files/krulvis/M ... 3", null, null)
3. <<closure>>
   httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
4. /snap/nextcloud/14827/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
   call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
5. /snap/nextcloud/14827/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php line 479
   emit("method:PUT", [Sabre\HTTP\Requ ... }])
6. /snap/nextcloud/14827/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php line 254
   invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
7. /snap/nextcloud/14827/htdocs/apps/dav/lib/Server.php line 301
   exec()
8. /snap/nextcloud/14827/htdocs/apps/dav/appinfo/v2/remote.php line 35
   exec()
9. /snap/nextcloud/14827/htdocs/remote.php line 163
   require_once("/snap/nextcloud ... p")

PUT /remote.php/dav/files/krulvis/Music/Freddie%20Gibbs%20-%20Bandana%20(2019)/04%20Crime%20Pays.mp3
from 192.168.1.1 by krulvis at 2019-07-24T20:25:56+00:00

Those get repeated a couple of times.

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

<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'passwordsalt' => '####',
  'secret' => '####',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '###.###.###.##',
    2 => 'krulvis.##',
    3 => '###.krulvis.###',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'overwrite.cli.url' => 'http://localhost',
  'dbtype' => 'mysql',
  'version' => '15.0.10.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '##',
  'installed' => true,
  'instanceid' => 'ocuqefo6pu9k',
  'mail_from_address' => 'joep',
  'mail_smtpmode' => 'php',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'krulvis.####',
  'loglevel' => 2,
  'maintenance' => false,
);

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

Apache2 logs are empty.

UPDATE

After some fiddling I decided to remove the snap package of Nextcloud and get some more control by installing nextcloud 16 manually. This however did not get rid of the aforementioned issue and I will thus post the settings that Nextcloud is currently installed with:

Nextcloud version (eg, 12.0.2): 16.0.3
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.29
PHP version (eg, 7.1): 7.2

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

<?php
$CONFIG = array (
  'instanceid' => 'oc4addqwxj5f',
  'passwordsalt' => '###',
  'secret' => '###',
  'trusted_domains' => 
  array (
    0 => '###.krulvis.###',
  ),
  'datadirectory' => '/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => 'http://###.krulvis.###',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '###',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mysql.utf8mb4' => true,
  'maintenance' => false,
);

Don’t worry, the internet is fine, it’s just your connection :wink:

How fast is you upstream? Unless you have fiber, this is significantly slower than downloads, therefore it does not make sense to compare it to certain download speeds when you want to check the upload performance. A good benchmark can be to upload to your server via scp or ftp some files. This way, you know what you can get in the best way possible for the connection between your client and your server. Nextcloud is usually slower since there are database operations in the background.

The wrong expected filesize can be related to some timeouts or memory limits:


Especially if your go through reverse proxies and stuff, it can be tricky to find the right spot.

I moved and marked it for the snap packages you seem to use.

One more question, the Nextcloud server is it on your home network or remote?

Ye, I can reach 1.5mb upload with regular ftp to the server. And it’s at my home network. But this happens regardless of where I am, syncing from remote or local network.

I actually completely reinstalled nextcloud to 16 with manual install instead of snap package manager, and I am still having the same problem. I set the memory usage of php to 1G

Turns out my ISP pushed an update on the modem/router that fucked with NAT hairpin functionality. Once I transformed all my clients such as desktops that run purely from LAN, I was able to at least have those working. The other clients Phone, laptop need to be re-configured every time I leave the house or just not sync while @ home.

Hi Krulvis,
looks, i have exactly the same problem… Pls, how can you manage this:

Once I transformed all my clients such as desktops that run purely from LAN, I was able to at least have those working.

?

Thank you very much