Nextcloud Server Extremely High CPU Usage

Nextcloud version: 21.0.3
Operating system and version: Ubuntu 20.04.2 LTS
Installed via snap
PHP version: 7.4.21

The issue you are facing:
Extremely high CPU utilization to the point where Nextcloud clients are stuck at “Checking for changes…” and will not sync. I’ve now allocated 4 CPU cores to my VM and 8GB of memory. All 4 cores continue to stay pegged at 95% and up… See below for HTOP output. My SQL is hogging up the CPU.

Currently there is no syncing jobs in progress so I’m not sure why the CPU is pegged so high persistently like this but I am almost positive this is the reason that all Nextcloud clients are stuck at “Checking for changes” and never syncing.

https://pasteboard.co/KcYqjhw.png

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

Steps to replicate it:

CPU utilization persists even after a reboot.

The output of your Nextcloud log in Admin > Logging:

None, log is empty…

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

<?php $CONFIG = array ( 'apps_paths' => array ( 0 => array ( 'path' => '/snap/nextcloud/current/htdocs/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps', 'url' => '/extra-apps', 'writable' => true, ), ), 'supportedDatabases' => array ( 0 => 'mysql', ), 'memcache.locking' => '\\OC\\Memcache\\Redis', 'memcache.local' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '/tmp/sockets/redis.sock', 'port' => 0, ), 'log_type' => 'file', 'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log', 'logfilemode' => 416, 'instanceid' => 'oc7n2gnsms03', 'passwordsalt' => 'AsQY2+nsk6egmzf9m4KDoU', 'secret' => 'AE4kFXs5l7crLiS+PpFl2/weGUNYnHSLuSZbz', 'trusted_domains' => array ( 0 => 'NEXTCLOUD.URL', ), 'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data', 'dbtype' => 'mysql', 'version' => '21.0.1.1', 'overwrite.cli.url' => 'NEXTCLOUD.URL', 'dbname' => 'nextcloud', 'dbhost' => 'localhost:/tmp/sockets/mysql.sock', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud', 'dbpassword' => 'IMvHLvcn5YVEuroaLtWumR1aJqeR8-fK2Q9HOvL4d_vJXQ7', 'installed' => true, ); The output of your Apache/nginx/system log in `/var/log/____`: N/A installed as a snap
1 Like