Nextcloud fails to sync data with useless to me error message "504 Gateway Time to MOVE /path/to/file"

Support intro

Hey all, I believe I was on the forum for the same thing last time but I wasn’t getting anywhere and people were convinced it was a storage problem, I’d confirmed it wasn’t, and as a solution I reinstalled on Rocky instead of Ubuntu, and I setup the raid using mdadm, instead of zfs pool.

This server is a very old hunk of junk, as a college student, I shouldn’t spend money on a better setup when this used to “just” work. This server at the moment, runs Plex Media Server, a Samba Share, and Nextcloud. I pay namecheap for a domain and SSL, and I have nextcloud setup “right” where going to mywebsite.com/nextcloud pulls up an https nextcloud with no security warning in the overview.

So I thought I was all good to go, and went to sync my few hundred GB’s of data to nextcloud, from Arch, and I get these same errors with different files each time it tries to sync, these aren’t files that are new. This all started when I had to reinstall an OS on my desktop, but I thought the problem, was that Ubuntu was trying to compare each of the thousands of files, so by doing a fresh install on my desktop again, and switching from to Rocky, from Ubuntu, that shouldn’t be the problem, but idk what it is then.

Here’s the picture of the error:
screenshotOfNextcloudError011022

Nextcloud version (eg, 20.0.5): 23.0.0
Operating system and version (eg, Ubuntu 20.04): Rocky Linux 8.5
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.37 (rocky)
PHP version (eg, 7.4): PHP 7.4.27

The issue you are facing:
So I thought I was all good to go, and went to sync my few hundred GB’s of data to nextcloud, from Arch, and I get these same errors with different files each time it tries to sync, these aren’t files that are new. This all started when I had to reinstall an OS on my desktop, but I thought the problem, was that Ubuntu was trying to compare each of the thousands of files, so by doing a fresh install on my desktop again, and switching from to Rocky, from Ubuntu, that shouldn’t be the problem, but idk what it is then.

Here’s the picture of the error:
screenshotOfNextcloudError011022

Is this the first time you’ve seen this error? (Y/N): I think it’s slightly different from last time but it’s hard to say.

Steps to replicate it:

  1. Attempt to sync data from client

The output of your Nextcloud log in Admin > Logging:

Error	index	Exception: The requested uri(/.env) cannot be processed by the script '/nextcloud/index.php')	
2022-01-11T11:04:07+0000
Error	index	Exception: The requested uri(/.env) cannot be processed by the script '/nextcloud/index.php')	
2022-01-11T05:08:18+0000
Error	index	Exception: The requested uri(/.env) cannot be processed by the script '/nextcloud/index.php')	
2022-01-11T04:39:38+0000
Error	index	Exception: The requested uri(/_ignition/execute-solution) cannot be processed by the script '/nextcloud/index.php')	
2022-01-11T03:03:51+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 20168704 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 13484032 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-11T02:55:29+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 310858783 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 14860288 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-11T02:32:05+0000
Error	index	Exception: The requested uri(/console/) cannot be processed by the script '/nextcloud/index.php')	
2022-01-11T01:41:51+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 219631613 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 207273984 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-11T01:15:48+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 231087655 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 195854336 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-11T01:15:48+0000
Error	index	Exception: The requested uri(/.env) cannot be processed by the script '/nextcloud/index.php')	
2022-01-11T01:14:46+0000
Error	index	Exception: The requested uri(/sitemap.xml) cannot be processed by the script '/nextcloud/index.php')	
2022-01-11T00:58:32+0000
Error	index	Exception: The requested uri(/mifs/.;/services/LogService) cannot be processed by the script '/nextcloud/index.php')	
2022-01-11T00:36:23+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 248543779 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 121683968 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-10T23:31:49+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 531930462 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 420593664 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-10T22:11:04+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 552092926 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 380772352 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-10T22:11:04+0000
Error	index	Exception: The requested uri(/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T21:59:49+0000
Error	index	Exception: The requested uri(/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:58:23+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:52+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:51+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:34+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:22+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:21+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:21+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:21+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:16+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:16+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:15+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:24:14+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:48+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:39+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:38+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:38+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:33+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:32+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:32+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:32+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:32+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T20:23:32+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 228363880 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 92774400 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-10T18:11:20+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 282042242 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 246489088 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-10T18:11:19+0000
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 293326099 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 271015936 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2022-01-10T18:11:19+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T17:52:51+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T17:52:50+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T17:52:48+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T17:52:47+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T17:52:40+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T17:52:39+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T17:52:39+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:19+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:18+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:17+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:17+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:14+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:14+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:13+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:13+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:13+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:19:09+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:18:53+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:18:52+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:18:49+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:18:35+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T15:18:34+0000
Error	index	Exception: The requested uri(/_ignition/execute-solution) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T06:53:31+0000
Error	index	Exception: The requested uri(/Autodiscover/Autodiscover.xml) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T05:19:17+0000
Error	index	Exception: The requested uri(/console/) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T05:12:59+0000
Error	index	Exception: The requested uri(/mifs/.;/services/LogService) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T03:37:35+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T03:11:58+0000
Error	index	Exception: The requested uri(/favicon.ico) cannot be processed by the script '/nextcloud/index.php')	
2022-01-10T03:11:58+0000
Error	index	Exception: The requested uri(/.env) cannot be processed by the script '/nextcloud/index.php')

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

<?php
$CONFIG = array (
  'instanceid' => '[redacted]',
  'passwordsalt' => '[redacted]',
  'secret' => '[redacted]',
  'trusted_domains' => 
  array (
          0 => 'PrivateIP',
          1 => 'RouterDDNS',
          2 => 'PublicIP#1',
          3 => 'PublicIP#2',
          4 => 'www.mywebsite.com',
          5 => 'mywebsite.com' ,
  ),
  'datadirectory' => '/newRaid/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '23.0.0.10',
  'overwrite.cli.url' => 'https://www.mywebsite.com/nextcloud',
  'dbname' => 'leviathan_db',
  'dbhost' => 'leviathan',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'me',
  'dbpassword' => 'myPassword',
  'installed' => true,
  # Additional tuning configuration
  'memcache.local' => '\OC\Memcache\APCu',
  'default_phone_region' => 'US',
);

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