High Ram use on OCC after update to v 21

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:

After updating i see ram and swap usage go to 100% as soon as an occ command gets executed. Same with nextcloud cron jobs.
They never get finished though, exit after some time with "killed"

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version: 21.0.1
Operating system and version : Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): 7.4.3

The issue you are facing:

High Ram use after update whenever a occ command gets executed it seems. Either manual or automatic whenever cron.php gets started.

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

Steps to replicate it:

  1. Start Server
  2. Wait

The output of your Nextcloud log in Admin > Logging:

v	Sabre\DAV\Exception\ServiceUnavailable: Das System befindet sich im Wartungsmodus.

    /var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:


    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 456:


    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:


    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:


    /var/www/html/nextcloud/apps/dav/lib/Server.php - line 332:


    /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:


    /var/www/html/nextcloud/remote.php - line 167:

    require_once("/var/www/ht ... p")

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

 'datadirectory' => '/mnt/CloudData',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'updater.secret' => '$2y$10$/hbeFAWvDzk06RVMndXLluz1N5OnsnAPWkFMhWJ70P3mQR3mwR.q.',

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

[Sun Apr 18 10:22:12.066248 2021] [core:notice] [pid 1032] AH00094: Command line: '/usr/sbin/apache2'
[Sun Apr 18 10:22:20.390726 2021] [access_compat:error] [pid 1091] [client] AH01797: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Apr 18 10:51:55.763324 2021] [access_compat:error] [pid 8039] [client] AH01797: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Apr 18 11:21:42.743591 2021] [access_compat:error] [pid 13580] [client] AH01797: client denied by server configuration: /var/www/html/nextcloud/config
[Sun Apr 18 11:28:18.231538 2021] [access_compat:error] [pid 14866] [client] AH01797: client denied by server configuration: /var/www/html/nextcloud/config

Check if apcu.enabled is activated for php in the command line interface. There are many other topics on that.

/var/www/html/nextcloud$ php7.4 -i | grep apcu
That is what i get as return.
Is that what you mean and does that mean it is enabled?

Ok it just solved itself for some reason.

I did nothing the problem just disappeared.
Can run the occ commands now without high ram useage, and the cron runs as well.