Errors when syncing large files (Nexcloud installed via Docker (Portainer) within Open Media Vault 6 installed direct on Debian

Nextcloud version: 20.0.2
Operating system and version: Host: Debian 11, clients: Ubuntu 20.04), Windows 10
Nginx version: in nextcloud container: 1.20.2, in letsencrypt container: 1.18.0
PHP version: 7.4.26

The issue you are facing:

I’m using an old NUC to experiment with Nextcloud with a long-term plan to use it to replace Tresorit. Current setup is an internal 500GB SSD with about 100GB reserved for the OS (Debian 11) and 400GB for data, plus an external 1TB SSD (however this is not being used by Nextcloud at all rn).

I used the guide here (under “Nextcloud subdomain reverse proxy example”): Let's Encrypt, Nginx & Reverse Proxy Starter Guide - 2019 Edition | LinuxServer.io

Here’s the stack I used to install everything in case it’s relevant:

Based on: Uploading big files > 512MB — Nextcloud latest Administration Manual latest documentation
I edited /config/nextcloud/config/php/php-local.ini AND /config/letsencrypt/php/php-local.ini to add the following:

php_value upload_max_filesize = 80G
php_value post_max_size = 80G
pm.max_children = 20

And added the following line to /nextcloud/config/nginx/nginx.conf AND config/letsencrypt/nginx/nginx.conf:

client_max_body_size 80000M;

As I will occasionally want to sync very large files. However, sync fails, usually with the pop-up Nextcloud notificiation saying “path/file.xxx could not be synced fue to an error. See the log for details.” Sync does succeed occasionally but much later - several days later. Notably, the Nexcloud GUI still reports the following under Settings/PHP:

Memory Limit: 512 MB

Max Execution Time: 3600

Upload max size: 1 GB

Is this the first time you’ve seen this error? (Y/N): N, been a problem since I installed Nexcloud ca. 1 week ago

Steps to replicate it:

  1. Install Nextcloud per the guide linked above
  2. Edit the relevant php-local.ini files with the values stated above
  3. Create a sync folder, copy a large (+500MB) file to the local folder; sync will fail

The output of your Nextcloud log in Admin > Logging:

Swift_TransportException: Connection could not be established with host 127.0.0.1 :stream_socket_client(): unable to connect to 127.0.0.1:25 (Connection refused)

    <<closure>>

    Swift_Transport_StreamBuffer->{closure}("*** sensiti ... *")

    /config/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - line 264:

    stream_socket_client()

    /config/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - line 58:

    Swift_Transport_StreamBuffer->establishSocketConnection()

    /config/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php - line 143:

    Swift_Transport_StreamBuffer->initialize()

    /config/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php - line 65:

    Swift_Transport_AbstractSmtpTransport->start()

    /config/www/nextcloud/lib/private/Mail/Mailer.php - line 204:

    Swift_Mailer->send()

    /config/www/nextcloud/apps/notifications/lib/MailNotifications.php - line 215:

    OC\Mail\Mailer->send()

    /config/www/nextcloud/apps/notifications/lib/MailNotifications.php - line 166:

    OCA\Notifications\MailNotifications->sendEmailToUser()

    /config/www/nextcloud/apps/notifications/lib/BackgroundJob/SendNotificationMails.php - line 49:

    OCA\Notifications\MailNotifications->sendEmails()

    /config/www/nextcloud/lib/public/BackgroundJob/Job.php - line 79:

    OCA\Notifications\BackgroundJob\SendNotificationMails->run()

    /config/www/nextcloud/lib/public/BackgroundJob/TimedJob.php - line 63:

    OCP\BackgroundJob\Job->execute()

    /config/www/nextcloud/cron.php - line 128:

    OCP\BackgroundJob\TimedJob->execute()

More: PrivateBin

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!): NB this is located in my case in /config/nextcloud/config/www/nextcloud/config/config.php

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'oc1fitq8v4p8',
  'passwordsalt' => '--------------------',
  'secret' => '--------------------',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.--------------------.duckdns.org',
  ),
  'dbtype' => 'mysql',
  'version' => '23.0.2.1',
  'overwrite.cli.url' => 'https://nextcloud.--------------------.duckdns.org',
  'dbname' => 'nextcloud',
  'dbhost' => 'mariadb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => '--------------------',
  'installed' => true,
  'maintenance' => false,
);

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

/config/nextcloud/config/log/nginx/access.log: PrivateBin

/config/nextcloud/config/log/nginx/error.log:

2022/03/15 08:18:46 [error] 5303#5303: *49079 client intended to send too large body: 966538461 bytes, client: 86.56.31.75, server: _, request: "PUT /remote.php/dav/uploads/admin/432286726/0000000000000001 HTTP/1.1", host: "nextcloud.-------------.duckdns.org"
2022/03/15 08:21:33 [error] 5303#5303: *49305 client intended to send too large body: 960414012 bytes, client: 86.56.31.75, server: _, request: "PUT /remote.php/dav/uploads/admin/1839321560/0000000000000001 HTTP/1.1", host: "nextcloud.-------------.duckdns.org"