Slow upload from phone client

Nextcloud version 12.0.4:
Operating system and version Ubuntu 16.04.3 LTS:
Apache or nginx version Apache/2.4.18:
PHP version PHP 7.0.22-0ubuntu0.16.04.1:
Is this the first time you’ve seen this error?: no

Can you reliably replicate it? (If so, please outline steps):
Upload large file from phone client, upload speed around 1M/s (on local WLAN).

The issue you are facing: very slow upload. Nextcloud installed on Ubuntu in ESXi. iSCSI to QNAP NAS as mounted directory for Nextcloud data. MySQL also on same NAS.
Using split DNS, same FQDN internal resolving to internal IP, external to external IP of the router with port forwarding.

The output of your Nextcloud log in Admin > Logging:
Fatal webdav Sabre\DAV\Exception\BadRequest: expected filesize 1024000 got 233472 2017-12-21T09:33:02+0100
Error PHP Undefined offset: 3 at /var/www/nextcloud/apps/activity/lib/FilesHooks.php#620 2017-12-18T15:15:59+0100

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
Preformatted text<?php
$CONFIG = array (
‘updatechecker’ => false,
‘instanceid’ => ‘removed’,
‘passwordsalt’ => ‘removed’,
‘secret’ => ‘removed’,
‘trusted_domains’ =>
array (
0 => ‘10.36.90.12’,
1 => ‘FQDN was here’,
),
‘datadirectory’ => ‘/sloth’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘12.0.4.3’,
‘dbname’ => ‘owncloud’,
‘dbhost’ => ‘10.36.90.254’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘oc_admin’,
‘dbpassword’ => ‘password was here’,
‘overwriteprotocol’ => ‘https’,
‘overwrite.cli.url’ => ‘https://FQDN was here:8585/nextcloud/’,
‘logtimezone’ => ‘Europe/Berlin’,
‘log_type’ => ‘owncloud’,
‘logfile’ => ‘/sloth/nextcloud.log’,
‘log_rotate_size’ => 1048576,
‘installed’ => true,
‘ldapIgnoreNamingRules’ => false,
‘filesystem_check_changes’ => 1,
‘quota_include_external_storage’ => false,
‘knowledgebaseenabled’ => false,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘filelocking.enabled’ => ‘true’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
),
‘mail_smtpmode’ => ‘smtp’,
‘mail_from_address’ => ‘owncloud’,
‘mail_domain’ => ‘mail domain was here’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_smtpauth’ => 1,
‘mail_smtphost’ => ‘smtp was here’,
‘mail_smtpport’ => ‘465’,
‘mail_smtpname’ => ‘email was here’,
‘mail_smtppassword’ => ‘password was here’,
‘mail_smtpsecure’ => ‘ssl’,
‘maintenance’ => false,
‘loglevel’ => 2,
‘enabledPreviewProviders’ =>
array (
0 => ‘OC\Preview\PNG’,
1 => ‘OC\Preview\JPEG’,
2 => ‘OC\Preview\GIF’,
3 => ‘OC\Preview\BMP’,
4 => ‘OC\Preview\XBitmap’,
5 => ‘OC\Preview\MarkDown’,
6 => ‘OC\Preview\MP3’,
7 => ‘OC\Preview\TXT’,
8 => ‘OC\Preview\Movie’,
),
‘updater.release.channel’ => ‘stable’,
‘ldapProviderFactory’ => ‘\OCA\User_LDAP\LDAPProviderFactory’,
‘theme’ => ‘’,
);

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


Remember, this information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart: Feel free to use a pastebin service, otherwise log files can be indented with 4 spaces on each line to present them in a friendlier way on the forum.

For the expected filesize, there are different reasons:

I would also use redis as filelocking cache:
'memcache.locking' => '\OC\Memcache\Redis',
https://docs.nextcloud.com/server/12/admin_manual/configuration_server/caching_configuration.html?highlight=caching

If that is fixed, I’d check the server during uploads. If you haven’t done any database tuning, setting proper cache sizes can speed up a lot of things (especially many small files).

1 Like