NC Locks when syncing large files

Nextcloud version 28, self hosted
Operating system and version: ubuntu server 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52
PHP version (eg, 7.4): 8.1.2-1ubuntu2.14 (cli)

The issue you are facing:
When I sync large files, Nextcloud locks up and becomes unreachable from the outside. SSH’ing to the public address doesn’t work either.

I can SSH to the server through the local IP and everything works from there. I can also log in through the browser, using the local IP.

Rebooting the server doesn’t help, neither does rebooting my internet connection.

; File Uploads ;

; Whether to allow HTTP file uploads.
; PHP: Description of core php.ini directives - Manual
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; PHP: Description of core php.ini directives - Manual
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 200M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20

Is this the first time you’ve seen this error? (Y/N):
No, it pretty much happens all the time. Last time I had to do a complete reinstallation.

It can also happen if I try to sync several files, or delete a large number of files.

Steps to replicate it:

  1. log into Nextcloud
  2. Sync a large file (70 MB+)
  3. Watch it crash

The output of your Nextcloud log in Admin > Logging:

Can't log in, so...

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

$CONFIG = array (
  'instanceid' => 'oczc73rezs5k',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'DK',
  'trusted_domains' => 
  array (
    0 => 'XXX',
    1 => '',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://xxx',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxx',
  'installed' => true,
  'simpleSignUpLink.shown' => false,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' => 
  array (
    0 => 'news',
    1 => 'files_rightclick',
  'updater.secret' => 'xxx',

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



Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

/var/log/apache2$ cat nextcloud_error.log
[Sun Feb 25 00:00:00.485774 2024] [ssl:warn] [pid 1024] AH01909: nextcloud:443:0 server certificate does NOT include an ID which matches the server name

Can you check the logs from the local network when it starts to hang?

You use the bruteforce app, or fail2ban or other services that can block a connection? It is a bit strange that ssh from the outside doesn’t work either.

If you upload via the desktop client, you can limit the bandwidth. In such a case, does it block the connection as well?


Sorry it took a while to get back. The instance came back on after some resetting and reconfiguring of the router.

I use CrowdSec instead of fail2ban, and I should have bruteforce app installed, if I remember correctly.

I’ll see if I can capture a logfile next time it happens, though I do have a sneaky suspicion that the issue could lie elsewhere.