Long (several minutes) delay before file transfers actually start

Nextcloud version (eg, 20.0.5): Nextcloud Hub 7 (28.0.3)
Operating system and version (eg, Ubuntu 20.04): Linux 6.1.74-Unraid x86_64
Apache or nginx version (eg, Apache 2.4.25): not sure where to find it, but its whatever the current NextcloudAIO installs' PHP version _(eg, 7.4)_: 8.2.16`
Desktop Client - 3.12.3

The issue you are facing:
If I try and download a file from nextcloud using the windows client, it hangs for about a minute or two on the file transfer “calculating” screen, doing nothing. Then suddenly it will start transferring, and the transfer speed seems correct (maybe even faster than expected) but something is definitely wrong.

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

Steps to replicate it:

  1. Transfer files through the nextcloud desktop app on windows.

The output of your Nextcloud log in Admin > Logging:

Nothing in there.

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

<?php
$CONFIG = array (
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'appsallowlist' => false,
  'check_data_directory_permissions' => false,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'nextcloud-aio-redis',
    'password' => '',
    'port' => 6379,
  ),
'overwritehost' => 'domain.uk',
  'overwriteprotocol' => 'https',
  'passwordsalt' => '',
  'secret' => 'OsE3zOhz0g5oG4/VhomYj5Ocm7pC3z6mySiMOoeysQel23N9',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'domain.uk',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '28.0.3.2',
  'overwrite.cli.url' => 'https://domain.uk/',
  'dbname' => 'nextcloud_database',
  'dbhost' => 'nextcloud-aio-database',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '',
  'maintenance' => false,
  'loglevel' => '2',
  'log_type' => 'file',
  'logfile' => '/var/www/html/data/nextcloud.log',
  'log_rotate_size' => '10485760',
  'log.condition' =>
  array (
    'apps' =>
    array (
      0 => 'admin_audit',
    ),
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'enabledPreviewProviders' =>
array (
    1 => 'OC\\Preview\\Image',
    2 => 'OC\\Preview\\MarkDown',
    3 => 'OC\\Preview\\MP3',
    4 => 'OC\\Preview\\TXT',
    5 => 'OC\\Preview\\OpenDocument',
    6 => 'OC\\Preview\\Movie',
    7 => 'OC\\Preview\\Krita',
    0 => 'OC\\Preview\\Imaginary',
  ),
  'enable_previews' => true,
  'upgrade.disable-web' => true,
  'mail_smtpmode' => 'smtp',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 30',
  'activity_expire_days' => '30',
  'simpleSignUpLink.shown' => false,
  'share_folder' => '/Shared',
  'one-click-instance.link' => 'https://nextcloud.com/all-in-one/',
  'upgrade.cli-upgrade-link' => 'https://github.com/nextcloud/all-in-one/discussions/2726',
  'updatedirectory' => '/nc-updater',
  'maintenance_window_start' => 100,
  'allow_local_remote_servers' => true,
  'davstorage.request_timeout' => 7200,
  'htaccess.RewriteBase' => '/',
  'dbpersistent' => false,
  'files_external_allow_create_new_local' => true,
  'trusted_proxies' =>
  array (
    0 => '127.0.0.1',
    1 => '::1',
  ),
  'preview_imaginary_url' => 'http://nextcloud-aio-imaginary:9000',
  'preview_imaginary_key' => '',
);

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

Connection to nextcloud-aio-nextcloud (172.25.0.7) 9000 port [tcp/*] succeeded!
[Tue Mar 26 07:06:01.119473 2024] [mpm_event:notice] [pid 50:tid 22768019192584] AH00489: Apache/2.4.58 (Unix) configured -- resuming normal operations
[Tue Mar 26 07:06:01.119517 2024] [core:notice] [pid 50:tid 22768019192584] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
{"level":"info","ts":1711436761.12273,"msg":"using provided configuration","config_file":"/tmp/Caddyfile","config_adapter":""}
nc: getaddrinfo for host "nextcloud-aio-nextcloud" port 9000: Name does not resolve
Connection to nextcloud-aio-nextcloud (172.25.0.5) 9000 port [tcp/*] succeeded!
{"level":"info","ts":1711746334.0567746,"msg":"using provided configuration","config_file":"/tmp/Caddyfile","config_adapter":""}
[Fri Mar 29 21:05:34.075269 2024] [mpm_event:notice] [pid 56:tid 22809289685768] AH00489: Apache/2.4.58 (Unix) configured -- resuming normal operations
[Fri Mar 29 21:05:34.075287 2024] [core:notice] [pid 56:tid 22809289685768] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
[Thu Apr 04 00:43:28 2024] [error] [(111)Connection refused] [client: [AH00957: FCGI: attempt to connect to 172.25.0.5:9000 (nextcloud-aio-nextcloud:9000) failed]
[Thu Apr 04 00:43:28 2024] [error] [client: 45.133.172.93, 172.70.85.84, 172.25.0.1] [AH01079: failed to make connection to backend: nextcloud-aio-nextcloud] [Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0]
[Thu Apr 04 00:43:31 2024] [error] [(111)Connection refused] [client: [AH00957: FCGI: attempt to connect to 172.25.0.5:9000 (nextcloud-aio-nextcloud:9000) failed]
[Thu Apr 04 00:43:31 2024] [error] [client: myIP, xxxxxx.74.81, 172.25.0.1] [AH01079: failed to make connection to backend: nextcloud-aio-nextcloud] [COOLWSD HTTP Agent 23.05.9.3]
Connection to nextcloud-aio-nextcloud (172.25.0.5) 9000 port [tcp/*] succeeded!
{"level":"info","ts":1712187823.0572336,"msg":"using provided configuration","config_file":"/tmp/Caddyfile","config_adapter":""}
{"level":"error","ts":1712187823.0727894,"logger":"http.log.error","msg":"dial tcp 127.0.0.1:8000: connect: connection refused","request":{"remote_ip":"172.25.0.1","remote_port":"49610","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/index.php/apps/notify_push/test/version","headers":{"X-Forwarded-Scheme":["https"],"X-Forwarded-Proto":["https"],"Cdn-Loop":["cloudflare"],"Cf-Ipcountry":["GB"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-For":["myIP, xxxxxx.74.115"],"X-Real-Ip":["xxxxxx.74.115"],"Accept-Encoding":["gzip, br"],"Cf-Ray":["86ecec25efeb2236-MAN"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Accept":["*/*"]}},"duration":0.000306415,"status":502,"err_id":"g1ug4480y","err_trace":"reverseproxy.statusError (reverseproxy.go:1267)"}
[Thu Apr 04 00:43:43.075338 2024] [mpm_event:notice] [pid 49:tid 22385547201288] AH00489: Apache/2.4.58 (Unix) configured -- resuming normal operations
[Thu Apr 04 00:43:43.075360 2024] [core:notice] [pid 49:tid 22385547201288] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
{"level":"error","ts":1712189227.2322216,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.163282549,"request":{"remote_ip":"172.25.0.1","remote_port":"52118","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0024.MP4","headers":{"Cf-Ipcountry":["GB"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"X-Forwarded-Proto":["https"],"X-Forwarded-For":["myIP, xxxxxx.74.88, 172.25.0.1"],"X-Real-Ip":["xxxxxx.74.88"],"Cf-Connecting-Ip":["myIP"],"Cookie":[],"X-Forwarded-Scheme":["https"],"X-Forwarded-Host":["domain.uk"],"Cdn-Loop":["cloudflare"],"Authorization":[],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cf-Ray":["86ed0df4ca5b6aac-MAN"],"Accept-Encoding":["gzip, br"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:52118: write: broken pipe"}
{"level":"error","ts":1712189227.2332501,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.054912545,"request":{"remote_ip":"172.25.0.1","remote_port":"52090","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0031.MP4","headers":{"X-Forwarded-For":["myIP, 172.69.79.240, 172.25.0.1"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Connecting-Ip":["myIP"],"Accept-Encoding":["gzip, br"],"X-Forwarded-Proto":["https"],"Cdn-Loop":["cloudflare"],"X-Forwarded-Host":["domain.uk"],"Authorization":[],"X-Real-Ip":["172.69.79.240"],"Cf-Ipcountry":["GB"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Scheme":["https"],"Cf-Ray":["86ed0df47b230755-MAN"],"Cookie":[]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:52090: write: broken pipe"}
{"level":"error","ts":1712189227.2377186,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.359902824,"request":{"remote_ip":"172.25.0.1","remote_port":"52126","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0022.MP4","headers":{"X-Forwarded-Scheme":["https"],"Cf-Ray":["86ed0df4cb8b0746-MAN"],"X-Forwarded-Proto":["https"],"X-Forwarded-For":["myIP, 172.69.79.154, 172.25.0.1"],"Cdn-Loop":["cloudflare"],"Accept-Encoding":["gzip, br"],"Authorization":[],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cookie":[],"Cf-Ipcountry":["GB"],"X-Forwarded-Host":["domain.uk"],"X-Real-Ip":["172.69.79.154"],"Cf-Connecting-Ip":["myIP"],"Cf-Visitor":["{\"scheme\":\"https\"}"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:52126: write: broken pipe"}
{"level":"error","ts":1712189227.2528472,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.051514359,"request":{"remote_ip":"172.25.0.1","remote_port":"52104","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0030.MP4","headers":{"Cf-Connecting-Ip":["myIP"],"Cookie":[],"X-Forwarded-Host":["domain.uk"],"Cf-Ipcountry":["GB"],"X-Forwarded-For":["myIP, xxxxxx.74.8, 172.25.0.1"],"Accept-Encoding":["gzip, br"],"Cdn-Loop":["cloudflare"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Ray":["86ed0df4cbe40761-MAN"],"X-Forwarded-Scheme":["https"],"X-Forwarded-Proto":["https"],"Authorization":[],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Real-Ip":["xxxxxx.74.8"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:52104: write: broken pipe"}
{"level":"error","ts":1712189236.79526,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.070342257,"request":{"remote_ip":"172.25.0.1","remote_port":"37926","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00082.ARW","headers":{"Accept-Encoding":["gzip, br"],"X-Forwarded-Host":["domain.uk"],"X-Real-Ip":["xxxxxx.33.176"],"Cdn-Loop":["cloudflare"],"Cf-Connecting-Ip":["myIP"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cookie":[],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"X-Forwarded-Scheme":["https"],"Authorization":[],"Cf-Ipcountry":["GB"],"X-Forwarded-Proto":["https"],"Cf-Ray":["86ed0e6f9bdf0ac7-MAN"],"X-Forwarded-For":["myIP, xxxxxx.33.176, 172.25.0.1"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37926: write: broken pipe"}
{"level":"error","ts":1712189236.7966352,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.055332954,"request":{"remote_ip":"172.25.0.1","remote_port":"37954","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0033.MP4","headers":{"Cf-Ipcountry":["GB"],"Cf-Ray":["86ed0e6f9ae2075e-MAN"],"X-Forwarded-For":["myIP, xxxxxx.74.92, 172.25.0.1"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-Scheme":["https"],"X-Forwarded-Proto":["https"],"X-Real-Ip":["xxxxxx.74.92"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Authorization":[],"Cdn-Loop":["cloudflare"],"Accept-Encoding":["gzip, br"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cookie":[],"X-Forwarded-Host":["domain.uk"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37954: write: broken pipe"}
{"level":"error","ts":1712189236.7982638,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.038815246,"request":{"remote_ip":"172.25.0.1","remote_port":"37944","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0034.MP4","headers":{"X-Forwarded-Scheme":["https"],"Cf-Connecting-Ip":["myIP"],"X-Real-Ip":["xxxxxx.33.164"],"Cf-Ray":["86ed0e6f99d36ab3-MAN"],"X-Forwarded-Proto":["https"],"Cookie":[],"X-Forwarded-Host":["domain.uk"],"X-Forwarded-For":["myIP, xxxxxx.33.164, 172.25.0.1"],"Authorization":[],"Accept-Encoding":["gzip, br"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Ipcountry":["GB"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cdn-Loop":["cloudflare"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37944: write: broken pipe"}
{"level":"error","ts":1712189236.7996004,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.057277205,"request":{"remote_ip":"172.25.0.1","remote_port":"37934","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0032.MP4","headers":{"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"X-Forwarded-Host":["domain.uk"],"Cf-Connecting-Ip":["myIP"],"Accept-Encoding":["gzip, br"],"Cdn-Loop":["cloudflare"],"X-Real-Ip":["xxxxxx.33.134"],"Cf-Ray":["86ed0e6f5a736aaf-MAN"],"X-Forwarded-Scheme":["https"],"Cookie":[],"Authorization":[],"Cf-Ipcountry":["GB"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Proto":["https"],"X-Forwarded-For":["myIP, xxxxxx.33.134, 172.25.0.1"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37934: write: broken pipe"}
{"level":"error","ts":1712189259.3489673,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.099510198,"request":{"remote_ip":"172.25.0.1","remote_port":"51832","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00180.ARW","headers":{"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Host":["domain.uk"],"Accept-Encoding":["gzip, br"],"X-Forwarded-Scheme":["https"],"X-Forwarded-For":["myIP, xxxxxx.74.22, 172.25.0.1"],"Cf-Ray":["86ed0eab2a872207-MAN"],"Cf-Connecting-Ip":["myIP"],"X-Real-Ip":["xxxxxx.74.22"],"Cf-Ipcountry":["GB"],"Authorization":[],"X-Forwarded-Proto":["https"],"Cdn-Loop":["cloudflare"],"Cookie":[]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:51832: write: broken pipe"}
{"level":"error","ts":1712189259.350254,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.151554467,"request":{"remote_ip":"172.25.0.1","remote_port":"51822","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00083.ARW","headers":{"Accept-Encoding":["gzip, br"],"Cookie":[],"X-Real-Ip":["172.69.79.137"],"X-Forwarded-For":["myIP, 172.69.79.137, 172.25.0.1"],"X-Forwarded-Proto":["https"],"Cf-Ray":["86ed0eaabc732dd9-MAN"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Authorization":[],"Cf-Ipcountry":["GB"],"X-Forwarded-Host":["domain.uk"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cdn-Loop":["cloudflare"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-Scheme":["https"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:51822: write: broken pipe"}
{"level":"error","ts":1712189259.4021077,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.076017978,"request":{"remote_ip":"172.25.0.1","remote_port":"46612","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00184.ARW","headers":{"X-Forwarded-For":["myIP, 172.69.79.164, 172.25.0.1"],"Cdn-Loop":["cloudflare"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Scheme":["https"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cookie":[],"Cf-Connecting-Ip":["myIP"],"Authorization":[],"X-Forwarded-Proto":["https"],"Cf-Ray":["86ed0f3658a254e2-MAN"],"Accept-Encoding":["gzip, br"],"X-Real-Ip":["172.69.79.164"],"Cf-Ipcountry":["GB"],"X-Forwarded-Host":["domain.uk"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46612: write: broken pipe"}
{"level":"error","ts":1712189261.9257627,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.062678126,"request":{"remote_ip":"172.25.0.1","remote_port":"46632","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00186.ARW","headers":{"X-Forwarded-Scheme":["https"],"Cf-Ray":["86ed0f379bdc2dd5-MAN"],"Cookie":[],"X-Forwarded-Host":["domain.uk"],"Authorization":[],"X-Forwarded-For":["myIP, 172.69.79.153, 172.25.0.1"],"X-Real-Ip":["172.69.79.153"],"Cdn-Loop":["cloudflare"],"Accept-Encoding":["gzip, br"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-Proto":["https"],"Cf-Ipcountry":["GB"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46632: write: broken pipe"}
{"level":"error","ts":1712189261.9257607,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.041199748,"request":{"remote_ip":"172.25.0.1","remote_port":"46646","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00188.ARW","headers":{"Cf-Ipcountry":["GB"],"Cf-Ray":["86ed0f37f874074f-MAN"],"X-Forwarded-Host":["domain.uk"],"Cookie":[],"X-Forwarded-Scheme":["https"],"Accept-Encoding":["gzip, br"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cdn-Loop":["cloudflare"],"Authorization":[],"X-Forwarded-Proto":["https"],"Cf-Connecting-Ip":["myIP"],"X-Real-Ip":["xxxxxx.74.114"],"X-Forwarded-For":["myIP, xxxxxx.74.114, 172.25.0.1"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46646: write: broken pipe"}
{"level":"error","ts":1712189261.9260585,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.050345885,"request":{"remote_ip":"172.25.0.1","remote_port":"46638","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00187.ARW","headers":{"X-Forwarded-Scheme":["https"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Authorization":[],"Accept-Encoding":["gzip, br"],"Cdn-Loop":["cloudflare"],"X-Forwarded-Proto":["https"],"Cf-Ipcountry":["GB"],"X-Real-Ip":["172.69.79.136"],"X-Forwarded-For":["myIP, 172.69.79.136, 172.25.0.1"],"X-Forwarded-Host":["domain.uk"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cf-Connecting-Ip":["myIP"],"Cookie":[],"Cf-Ray":["86ed0f37acf42dd8-MAN"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46638: write: broken pipe"}
{"level":"error","ts":1712189261.9264,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.074657691,"request":{"remote_ip":"172.25.0.1","remote_port":"46620","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/DSC00185.ARW","headers":{"Cdn-Loop":["cloudflare"],"X-Forwarded-Host":["domain.uk"],"Accept-Encoding":["gzip, br"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-Scheme":["https"],"Cf-Ray":["86ed0f378f2521cb-MAN"],"Cf-Ipcountry":["GB"],"X-Forwarded-For":["myIP, 172.69.79.164, 172.25.0.1"],"Cf-Connecting-Ip":["myIP"],"X-Forwarded-Proto":["https"],"Authorization":[],"X-Real-Ip":["172.69.79.164"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"],"Cookie":[]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:46620: write: broken pipe"}
{"level":"error","ts":1712189302.192545,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.046720174,"request":{"remote_ip":"172.25.0.1","remote_port":"49538","client_ip":"myIP","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7-PhotosFTP/C0024.MP4","headers":{"X-Forwarded-Proto":["https"],"Cf-Ray":["86ed0fa429c254d6-MAN"],"Cf-Ipcountry":["GB"],"X-Real-Ip":["xxxxxx.74.88"],"Authorization":[],"X-Forwarded-Scheme":["https"],"X-Forwarded-For":["myIP, xxxxxx.74.88, 172.25.0.1"],"Accept-Encoding":["gzip, br"],"X-Forwarded-Host":["domain.uk"],"Cf-Connecting-Ip":["myIP"],"Cookie":[],"Cf-Visitor":["{\"scheme\":\"https\"}"],"Cdn-Loop":["cloudflare"],"User-Agent":["Mozilla/5.0 (Android) Nextcloud-android/3.28.1"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:49538: write: broken pipe"}
{"level":"error","ts":1712212152.9667969,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:8000","duration":0.060811283,"request":{"remote_ip":"172.25.0.1","remote_port":"37728","client_ip":"45.133.172.65","proto":"HTTP/1.1","method":"GET","host":"domain.uk","uri":"/remote.php/dav/files/nirin/A7ftp/C0024.MP4","headers":{"Cf-Ray":["86ef3c8b0b4094b5-LHR"],"Authorization":[],"Accept":["*/*"],"Cf-Connecting-Ip":["45.133.172.65"],"X-Forwarded-Host":["domain.uk"],"Accept-Language":["en-GB,*"],"X-Request-Id":["32e27658-8d16-404c-b63d-c84471d15dcb"],"Cf-Visitor":["{\"scheme\":\"https\"}"],"X-Forwarded-For":["45.133.172.65, 172.70.162.193, 172.25.0.1"],"Cf-Ipcountry":["GB"],"Accept-Encoding":["gzip, br"],"User-Agent":["Mozilla/5.0 (Windows) mirall/3.12.3stable-Win64 (build 20240328) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"],"X-Forwarded-Scheme":["https"],"Cookie":[],"Cdn-Loop":["cloudflare"],"X-Forwarded-Proto":["https"],"X-Real-Ip":["172.70.162.193"]}},"error":"writing: write tcp 172.25.0.3:11000->172.25.0.1:37728: write: broken pipe"}
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...

Something I notice is that the ‘size remaining’ figure for the file is wrong, it’s about double what the file size actually is…

It seems like your Nextcloud instance is experiencing connection issues with the backend, resulting in incomplete responses and broken pipes. This could be causing the delay in file transfers.

The logs indicate several instances of “writing: write tcp” errors, indicating problems with writing to the TCP connection. This could be due to various reasons, including network congestion, resource constraints on the server, or misconfigurations.

Here are some steps you can take to troubleshoot and resolve the issue:

  1. Check Network Configuration: Ensure that there are no network issues between the Nextcloud server and its backend services. Verify that the network configuration is correct and that there are no firewall rules blocking the connections.
  2. Resource Utilization: Check the resource utilization on your Nextcloud server, including CPU, memory, and disk I/O. High resource usage could indicate performance bottlenecks that might affect the responsiveness of the server.
  3. Check Backend Services: Verify that all backend services, such as the database and Redis server, are running correctly and are accessible from the Nextcloud server. Check their logs for any errors or warnings that might indicate issues.
  4. Update Dependencies: Ensure that all software dependencies, including Nextcloud itself, PHP, and any third-party libraries or extensions, are up to date. Updates often include bug fixes and performance improvements that could help resolve the issue.
  5. Optimize Configuration: Review your Nextcloud configuration settings, including PHP configuration and Nextcloud configuration parameters, to ensure they are optimized for performance and stability.
  6. Monitor Logs: Continuously monitor the Nextcloud logs, as well as the logs of any related services, for any new errors or warnings that might provide clues about the cause of the issue.

By systematically troubleshooting and addressing potential causes, you should be able to identify and resolve the delay in file transfers on your Nextcloud instance.

My installation is Nextcloud AIO, set up within the last week. So everything is up to date and configured as per that setup. There isn’t anything I know how to change (and I would assume that the AIO setup already uses the correct configurations).

The server hardware isn’t causing any issues elsewhere. It’s a 13600k with 32gb of ram so its plenty of performance. 2.5gbe networking throughout.

No errors in any logs that I can see, other than the ones mentioned in that apache log. No idea what I can do to remedy them though.

The rest of the stuff there I don’t have any way of doing anything about… messing about installing other versions of php (different to the ones included in the aio setup) seems like a bad idea.

It sounds like you’ve already done some thorough troubleshooting. Since you’re using the Nextcloud All-In-One (AIO) setup and everything is up to date, there might be a few additional steps you could take to try to resolve the issues you’re experiencing:

  1. Check Nextcloud’s official documentation: Sometimes there are specific troubleshooting steps or configurations recommended by Nextcloud themselves. It’s worth checking their documentation or community forums for any insights related to your specific setup and the errors you’re encountering.
  2. Verify PHP settings: Even though you’re using the PHP version included in the AIO setup, there could be some configuration tweaks that might help improve performance or resolve compatibility issues. Reviewing the PHP settings and comparing them to Nextcloud’s recommended settings could be beneficial.
  3. Monitor resource usage: Even though your server hardware seems sufficient, it’s worth monitoring resource usage during peak times to see if there are any spikes or bottlenecks that could be causing the issues. Tools like top, htop, or server monitoring software can help with this.
  4. Consider reaching out to Nextcloud support: If you’re still unable to resolve the issues, reaching out to Nextcloud’s official support channels could provide additional assistance. They might have insights or recommendations specific to your setup that could help address the problems.

While it’s understandable that you might be hesitant to install different versions of PHP or make significant changes to your setup, sometimes small adjustments or additional troubleshooting steps can make a big difference in resolving issues.

How would I change php settings? and what settings are the recommended ones?