Nextcloud server version 22.2.3 hangs after slowly filling memory during sync

Nextcloud version 22.2.3
Operating system and version Debian 10.8/Buster (Turnkey 16.1)
Apache or nginx version Apache/2.4.38 (Debian)`
PHP version PHP 7.3.31-1~deb10u1

The issue you are facing:
Im trying to sync about 300G various data/file sizes but server works until eats up all RAM and just hangs. Nothing works. PC client loose connection, SSH is non responsive so i need to do STOP at Proxmox because even shutnown command returns “time out”.
When server restart sync continues after checking until all this memory dance repeats itself.
Initially i dedicated 8GB ram to it, but now it has 24GB, and that lasts bit longer - it crashes after eats that too.

htop at SSH shown slow but steady grow of “yellow” bar memory which is cache. When that fill up thats point when crashes.

Webmin shows 6% memory and 0% swap used. But Proxmox and htop shows all is eaten.

At some point i tried even to pause sync thinking it needs time to write on disks, but memory does not go down. I doubt its disks they are really fast. Raid 1+0 4x300GB 6G 15k sas on proliant dl380 g7 should be overkill for this instance. Right?

All tjis sync goes on local LAN.

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

Steps to replicate it:

  1. Fresh install Nextcloud server on linux and update it
  2. create account, link it with PC app and throw bunch of data in it to sync
  3. Wait till memory is eaten to freeze

The output of your Nextcloud log in Admin > Logging:

Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 7171081 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 7077888 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2021-12-08T11:52:29+0100
Error	no app in context	Sabre\DAV\Exception\BadRequest: Expected filesize of 4729337 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 81920 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.	
2021-12-08T11:34:32+0100
Fatal	webdav	Sabre\DAV\Exception\ServiceUnavailable: Could not open file

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

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxxxxxxxxxxx7a012f7c8458c75',
  'secret' => '1c9f1c8f1e8036643fxxxxxxxxxxxxxxxxxxx27',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'xxxxxxxxx',
    2 => '192.168.1.214',
    3 => 'xxxxxxxxx',
  ),
  'datadirectory' => '/var/www/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '22.2.3.0',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxxxxxxxxxxxxxxxxxxxxxd',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'instanceid' => 'xxxxxxxxxx',
  'updater.secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,

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

[Thu Apr 15 23:36:55.398411 2021] [mpm_prefork:notice] [pid 21159] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Thu Apr 15 23:36:55.398473 2021] [core:notice] [pid 21159] AH00094: Command line: '/usr/sbin/apache2'
[Thu Apr 15 23:37:05.588099 2021] [mpm_prefork:notice] [pid 21159] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 21:39:53.925176 2021] [mpm_prefork:notice] [pid 784] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 21:39:53.926122 2021] [core:notice] [pid 784] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 21:40:09.125334 2021] [mpm_prefork:notice] [pid 784] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 21:40:09.251499 2021] [ssl:warn] [pid 2059] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:40:09.252436 2021] [ssl:warn] [pid 2059] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:40:09.316871 2021] [ssl:warn] [pid 2060] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:40:09.317466 2021] [ssl:warn] [pid 2060] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:40:09.321903 2021] [mpm_prefork:notice] [pid 2060] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 21:40:09.321939 2021] [core:notice] [pid 2060] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 21:43:16.566966 2021] [mpm_prefork:notice] [pid 2060] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 21:43:16.702409 2021] [ssl:warn] [pid 14763] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:43:16.703426 2021] [ssl:warn] [pid 14763] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:43:16.810988 2021] [ssl:warn] [pid 14764] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:43:16.811968 2021] [ssl:warn] [pid 14764] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:43:16.821149 2021] [mpm_prefork:notice] [pid 14764] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 21:43:16.821228 2021] [core:notice] [pid 14764] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 21:44:31.662787 2021] [mpm_prefork:notice] [pid 14764] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 21:44:48.262327 2021] [ssl:warn] [pid 528] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:44:48.263259 2021] [ssl:warn] [pid 528] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:44:48.590076 2021] [ssl:warn] [pid 717] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:44:48.590676 2021] [ssl:warn] [pid 717] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:44:48.595474 2021] [mpm_prefork:notice] [pid 717] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 21:44:48.595525 2021] [core:notice] [pid 717] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 21:45:55.975257 2021] [mpm_prefork:notice] [pid 717] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 21:46:10.105901 2021] [ssl:warn] [pid 528] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:46:10.106825 2021] [ssl:warn] [pid 528] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:46:10.419667 2021] [ssl:warn] [pid 730] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:46:10.420267 2021] [ssl:warn] [pid 730] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:46:10.425026 2021] [mpm_prefork:notice] [pid 730] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 21:46:10.425077 2021] [core:notice] [pid 730] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 21:53:22.341157 2021] [mpm_prefork:notice] [pid 730] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 21:53:37.497765 2021] [ssl:warn] [pid 544] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:53:37.498913 2021] [ssl:warn] [pid 544] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:53:37.892077 2021] [ssl:warn] [pid 744] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:53:37.892672 2021] [ssl:warn] [pid 744] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 21:53:37.897572 2021] [mpm_prefork:notice] [pid 744] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 21:53:37.897611 2021] [core:notice] [pid 744] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 22:17:41.420599 2021] [mpm_prefork:notice] [pid 744] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 22:18:01.706391 2021] [ssl:warn] [pid 2361] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 22:18:01.707379 2021] [ssl:warn] [pid 2361] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 22:18:01.797578 2021] [ssl:warn] [pid 2363] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 22:18:01.798715 2021] [ssl:warn] [pid 2363] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 22:18:01.806671 2021] [mpm_prefork:notice] [pid 2363] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 22:18:01.806729 2021] [core:notice] [pid 2363] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 22:22:20.065890 2021] [mpm_prefork:notice] [pid 2363] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 22:22:38.683734 2021] [ssl:warn] [pid 3461] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 22:22:38.684391 2021] [ssl:warn] [pid 3461] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 22:22:38.752726 2021] [ssl:warn] [pid 3463] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 22:22:38.753643 2021] [ssl:warn] [pid 3463] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 22:22:38.760542 2021] [mpm_prefork:notice] [pid 3463] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 22:22:38.760594 2021] [core:notice] [pid 3463] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 23:21:48.077798 2021] [mpm_prefork:notice] [pid 3463] AH00171: Graceful restart requested, doing restart
[Tue Dec 07 23:21:48.159956 2021] [ssl:warn] [pid 3463] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:21:48.160590 2021] [ssl:warn] [pid 3463] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:21:48.160850 2021] [mpm_prefork:notice] [pid 3463] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 23:21:48.160865 2021] [core:notice] [pid 3463] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 23:21:52.568332 2021] [mpm_prefork:notice] [pid 3463] AH00171: Graceful restart requested, doing restart
[Tue Dec 07 23:21:52.630615 2021] [ssl:warn] [pid 3463] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:21:52.631189 2021] [ssl:warn] [pid 3463] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:21:52.631437 2021] [mpm_prefork:notice] [pid 3463] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 23:21:52.631450 2021] [core:notice] [pid 3463] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 23:22:13.975557 2021] [mpm_prefork:notice] [pid 3463] AH00171: Graceful restart requested, doing restart
[Tue Dec 07 23:22:14.047375 2021] [ssl:warn] [pid 3463] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:22:14.048020 2021] [ssl:warn] [pid 3463] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:22:14.048249 2021] [mpm_prefork:notice] [pid 3463] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 23:22:14.048263 2021] [core:notice] [pid 3463] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 23:22:46.889729 2021] [mpm_prefork:notice] [pid 3463] AH00169: caught SIGTERM, shutting down
[Tue Dec 07 23:23:04.415560 2021] [ssl:warn] [pid 536] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:23:04.416877 2021] [ssl:warn] [pid 536] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:23:04.826770 2021] [ssl:warn] [pid 744] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:23:04.827597 2021] [ssl:warn] [pid 744] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:23:04.833493 2021] [mpm_prefork:notice] [pid 744] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 23:23:04.833532 2021] [core:notice] [pid 744] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 07 23:37:25.766192 2021] [ssl:warn] [pid 523] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:37:25.767449 2021] [ssl:warn] [pid 523] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:37:26.230837 2021] [ssl:warn] [pid 730] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:37:26.231764 2021] [ssl:warn] [pid 730] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Tue Dec 07 23:37:26.238954 2021] [mpm_prefork:notice] [pid 730] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Dec 07 23:37:26.239030 2021] [core:notice] [pid 730] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 08:09:17.237808 2021] [ssl:warn] [pid 580] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 08:09:17.242953 2021] [ssl:warn] [pid 580] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 08:09:17.358472 2021] [ssl:warn] [pid 799] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 08:09:17.359134 2021] [ssl:warn] [pid 799] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 08:09:17.364208 2021] [mpm_prefork:notice] [pid 799] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 08:09:17.364304 2021] [core:notice] [pid 799] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 08:48:18.956256 2021] [ssl:warn] [pid 557] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 08:48:18.957758 2021] [ssl:warn] [pid 557] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 08:48:19.058446 2021] [ssl:warn] [pid 768] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 08:48:19.059088 2021] [ssl:warn] [pid 768] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 08:48:19.064164 2021] [mpm_prefork:notice] [pid 768] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 08:48:19.064215 2021] [core:notice] [pid 768] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 09:24:03.385070 2021] [ssl:warn] [pid 522] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 09:24:03.386307 2021] [ssl:warn] [pid 522] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 09:24:03.801236 2021] [ssl:warn] [pid 739] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 09:24:03.801849 2021] [ssl:warn] [pid 739] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 09:24:03.806789 2021] [mpm_prefork:notice] [pid 739] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 09:24:03.806831 2021] [core:notice] [pid 739] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 09:36:02.759093 2021] [core:notice] [pid 739] AH00052: child pid 1041 exit signal Segmentation fault (11)
[Wed Dec 08 09:36:03.021856 2021] [mpm_prefork:notice] [pid 739] AH00169: caught SIGTERM, shutting down
[Wed Dec 08 09:36:18.423741 2021] [ssl:warn] [pid 531] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 09:36:18.424686 2021] [ssl:warn] [pid 531] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 09:36:18.907596 2021] [ssl:warn] [pid 751] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 09:36:18.908493 2021] [ssl:warn] [pid 751] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 09:36:18.915097 2021] [mpm_prefork:notice] [pid 751] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 09:36:18.915176 2021] [core:notice] [pid 751] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 10:24:48.736269 2021] [ssl:warn] [pid 525] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:24:48.737368 2021] [ssl:warn] [pid 525] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:24:49.148576 2021] [ssl:warn] [pid 736] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:24:49.149195 2021] [ssl:warn] [pid 736] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:24:49.153791 2021] [mpm_prefork:notice] [pid 736] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 10:24:49.153831 2021] [core:notice] [pid 736] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 10:25:59.416933 2021] [mpm_prefork:notice] [pid 736] AH00171: Graceful restart requested, doing restart
[Wed Dec 08 10:25:59.504038 2021] [ssl:warn] [pid 736] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:25:59.504923 2021] [ssl:warn] [pid 736] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:25:59.505283 2021] [mpm_prefork:notice] [pid 736] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 10:25:59.505323 2021] [core:notice] [pid 736] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 10:26:15.181418 2021] [mpm_prefork:notice] [pid 736] AH00171: Graceful restart requested, doing restart
[Wed Dec 08 10:26:15.268839 2021] [ssl:warn] [pid 736] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:26:15.269493 2021] [ssl:warn] [pid 736] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:26:15.269753 2021] [mpm_prefork:notice] [pid 736] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 10:26:15.269768 2021] [core:notice] [pid 736] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 10:27:04.588890 2021] [mpm_prefork:notice] [pid 736] AH00169: caught SIGTERM, shutting down
[Wed Dec 08 10:27:19.435050 2021] [ssl:warn] [pid 538] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:27:19.436547 2021] [ssl:warn] [pid 538] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:27:19.845348 2021] [ssl:warn] [pid 742] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:27:19.845973 2021] [ssl:warn] [pid 742] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 10:27:19.851093 2021] [mpm_prefork:notice] [pid 742] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 10:27:19.851207 2021] [core:notice] [pid 742] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 11:14:14.430582 2021] [ssl:warn] [pid 519] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 11:14:14.432221 2021] [ssl:warn] [pid 519] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 11:14:14.845685 2021] [ssl:warn] [pid 730] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 11:14:14.846350 2021] [ssl:warn] [pid 730] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 08 11:14:14.850834 2021] [mpm_prefork:notice] [pid 730] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Wed Dec 08 11:14:14.850878 2021] [core:notice] [pid 730] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 08 11:14:15.361016 2021] [php7:error] [pid 784] [client 192.168.1.1:32448] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:87\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\\DB\\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(236): Doctrine\\DBAL\\Connection->executeQuery('SELECT * FROM `...', Array, Array, NULL)\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\\DB\\Connection->executeQuery('SELECT * FROM `...', Array, Array)\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/AppConfig.php(344): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/nextcloud/lib/private/AppConfig.php(109): OC\\AppConfig->loadConfigValues in /var/www/nextcloud/lib/private/DB/Connection.php on line 87

Ok, i did some additional work to narrow this down. I have strange problem to say at least.

I did fresh install, but this time i updated nextcloud up to last nc21 version. 21.0.7 i think. And there is absolutely same problem.

Then i thought there might be issue by syncing with PC app, so i tried to ftp about 50G of data and do turnkey-occ files:scan --all, but while ftp transfer is going - server increasing usage of cache memory and freezes again.

I mean, it goes up to 23,90GB of memory!! And never release it back.

Please, if someone has more experience with these strange (at least to me) problem, will you, please offer advice what to do. Whats happening and such.

Many thnx in advance!

Is there really no one who can offer advice on this? I still have same issue, even after clp server updates.