(Large) uploads start/stop

[/details]

Nextcloud version (eg, 20.0.5): 24.0.4 / 24.0.5
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4

The issue you are facing: Uploads don’t immediately start, once they do the transfers halt/pause and after a wait the transfer resumes, the start-stop behaviour continues until the file upload either times out (occasionally) or succeeds.

Nextcloud runs in a guest VM on a VMware server with 10Gbps connectivity. All other traffic is running fine and uploading via SCP is fast and at a constant rate until completed.

This is what I’m seeing on my Mac when uploading, has anyone seen anything like this?

image

I’ve improved the transfer rate threefold by increasing the chunk size. Yet the uploads still stop start.

Is this the first time you’ve seen this error? (Y/N): N, just finally getting around to dealing with it.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"Ok7yTqa87uybKLQSmVw7","level":3,"time":"2022-09-11T22:48:39+00:00","remoteAddr":"192.168.0.70,"user":"******","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/104857600","message":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 573440 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36","version":"24.0.5.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 573440 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":164,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":45,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":358,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":166,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":297,"CustomMessage":"--"}}

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

<?php
$CONFIG = array (
  'instanceid' => '******',
  'passwordsalt' => '******',
  'secret' => '******',
  'trusted_domains' =>
  array (
    0 => 'nc.domain.com',
  ),
  'datadirectory' => '/mnt/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '24.0.5.1',
  'overwrite.cli.url' => 'https://nc.domain.com',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '******',
  'dbpassword' => '******',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'dbindex' => 0,
    'timeout' => 1.5,
  ),
  'default_phone_region' => 'GB',
  'mail_from_address' => '****',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '******',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
    0 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtpname' => '**@****',
  'mail_smtppassword' => '******',
  'social_login_auto_redirect' => false,
  'default_language' => 'en_GB',
  'default_locale' => 'en_GB',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'forcessl' => true,
  'allow_local_remote_servers' => true,
  'session_keepalive' => true,
  'session_lifetime' => 86400,
  'app_install_overwrite' =>
  array (
    0 => 'flowupload',
  ),
  'updater.secret' => '******',
);

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

[Sun Sep 11 23:54:45.020996 2022] [proxy_fcgi:error] [pid 8865] (70007)The timeout specified has expired: [client 192.168.0.7:59594] AH01075: Error dispatching request to : (reading input brigade)
[Sun Sep 11 23:55:33.073896 2022] [proxy_fcgi:error] [pid 14740] (70007)The timeout specified has expired: [client 192.168.0.7:59827] AH01075: Error dispatching request to : (reading input brigade)
[Sun Sep 11 23:56:30.462934 2022] [proxy_fcgi:error] [pid 7607] (70007)The timeout specified has expired: [client 192.168.0.7:59475] AH01075: Error dispatching request to : (reading input brigade)
[Sun Sep 11 23:56:54.501379 2022] [proxy_fcgi:error] [pid 11292] (70007)The timeout specified has expired: [client 192.168.0.7:59672] AH01075: Error dispatching request to : (reading input brigade)
[Sun Sep 11 23:58:01.796987 2022] [proxy_fcgi:error] [pid 2591] (70007)The timeout specified has expired: [client 192.168.0.7:59736] AH01075: Error dispatching request to : (reading input brigade)

access.log

tail -n1000 /var/log/apache2/bcc-nc_access.log.1 | grep 192.168.0.7 | grep -v -e spreed -e heartbeat -e notifications -e PROPFIND -e csrftoken

192.168.0.7 - - [11/Sep/2022:23:49:00 +0100] "POST /login/confirm HTTP/1.1" 200 918 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:49:00 +0100] "DELETE /ocs/v2.php/apps/workflowengine/api/v1/workflows/user/5?format=json HTTP/1.1" 200 954 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:31:25 +0100] "PUT /remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/4613734400 HTTP/1.1" 408 763 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:51:43 +0100] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 1038 "-" "Mozilla/5.0 (Macintosh) mirall/3.4.3git (build 9390) (Nextcloud, osx-21.6.0 ClientArchitecture: arm64 OsArchitecture: arm64)"
192.168.0.7 - - [11/Sep/2022:23:30:11 +0100] "PUT /remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/838860800 HTTP/1.1" 408 763 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:29:51 +0100] "PUT /remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/629145600 HTTP/1.1" 408 763 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:32:22 +0100] "PUT /remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/6396313600 HTTP/1.1" 408 763 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:36:18 +0100] "PUT /remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/15204352000 HTTP/1.1" 408 763 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:31:05 +0100] "PUT /remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/4404019200 HTTP/1.1" 408 763 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:56:43 +0100] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 1038 "-" "Mozilla/5.0 (Macintosh) mirall/3.4.3git (build 9390) (Nextcloud, osx-21.6.0 ClientArchitecture: arm64 OsArchitecture: arm64)"
192.168.0.7 - - [11/Sep/2022:23:33:37 +0100] "PUT /remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/10171187200 HTTP/1.1" 408 763 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"
192.168.0.7 - - [11/Sep/2022:23:34:53 +0100] "PUT /remote.php/dav/uploads/******/web-file-upload-0f0b82ce2d8f9bc922810a3d070a915d-1662935347653/12268339200 HTTP/1.1" 408 763 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36"