Nextcloud will not sync

nextcloud 20.0.4 (hosted)
linux
apache server 2.4.46
php 7.4.9
mysql 10.3.27-MariaDB

The issue you are facing:
Files will not sync on nextcloud. When I try I get this error message:

Synchronized with local folder (date)
an error occurred while opening a folder. network access is disabled

Is this the first time you’ve seen this error? Y:

Steps to replicate it:

  1. try to sync files
  2. try again
  3. click account settings
  4. read error message
  5. join forum
    6 hope someone can help

nextcloud log:

Error	PHP	Error: Cannot modify header information - headers already sent by (output started at /home/myname/public_html/3rdparty/sabre/http/lib/Sapi.php:132) at /home/myname/public_html/apps/dav/lib/Connector/Sabre/File.php#691		2021-01-07T12:30:55-0500
Error	PHP	Error: Cannot modify header information - headers already sent by (output started at /home/myname/public_html/3rdparty/sabre/http/lib/Sapi.php:132) at /home/myname/public_html/apps/dav/lib/Connector/Sabre/File.php#691		2021-01-07T12:30:55-0500
Error	PHP	Error: Cannot modify header information - headers already sent by (output started at /home/myname/public_html/3rdparty/sabre/http/lib/Sapi.php:132) at /home/myname/public_html/apps/dav/lib/Connector/Sabre/File.php#691		2021-01-07T12:30:55-0500
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 2005507 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 540641 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.		2021-01-07T12:30:55-0500
Fatal	webdav	Doctrine\DBAL\Exception\DeadlockException: An exception occurred while executing 'UPDATE `oc_file_locks` SET `lock` = `lock` + 1, `ttl` = ? WHERE `key` = ? AND `lock` >= 0' with params [1609867126, "files\/4eaa1948e1bcaafcceb4082f2c8cc901"]: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction		2021-01-05T10:18:46-0500

config.php:

?php
$CONFIG = array (
  'instanceid' => 'o',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'myname.myusa.cloud',
  ),
  'datadirectory' => '/home/myname/nextclouddata',
  'dbtype' => 'mysql',
  'version' => '20.0.4.0',
  'overwrite.cli.url' => 'http://myname.myusa.cloud',
  'dbname' => 'myname_next362',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'myname_next362',
  'dbpassword' => 'W',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'myname@gmail.com',
  'mail_smtppassword' => '',
  'mail_smtpport' => '465',
);