Nextcloud version (eg, 18.0.2): 18.0.6
Operating system and version (eg, Ubuntu 20.04): Debian 10.4
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Debian)
PHP version (eg, 7.1): 7.3.14-1~deb10u1
The issue you are facing:
CPU has been near 100% for over 24 hours now, on a dedicated VPS running only Nextcloud, with one client (me) who is not doing anything. All the time cpu.cron appears to be running at least once. It is triggered by a 15 minute job in cron.d and Nextcloud config is set to cron. Looking at the database processlist, there is nearly always a query running at least once: SELECT path
FROM oc_filecache
WHERE (storage
= 3) AND (size
< 0) ORDER BY fileid
DESC. This will produce about 90,000 results from a table of over 200,000 entries. Nextcloud is naturally sluggish when used. I tried killing the process, but the same problem just starts again after a while.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Run Nextcloud with background jobs set to cron
- Run a cron job every 15 minutes that starts cron.php
- Observe CPU and database activity
The output of your Nextcloud log in Admin > Logging:
Empty
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
$CONFIG = array (
'instanceid' => '**************',
'passwordsalt' => '*************************',
'secret' => '************************************',
'trusted_domains' =>
array (
0 => 'cloud.example.com',
1 => 'example.cloud',
),
'datadirectory' => '/var/lib/nextcloud',
'overwrite.cli.url' => 'https://example.cloud',
'dbtype' => 'mysql',
'version' => '18.0.6.0',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => '************',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'maintenance' => false,
'filelocking.enabled' => true,
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,
),
'theme' => '',
'loglevel' => 2,
'logfile' => '/var/log/nextcloud/nextcloud.log',
'mysql.utf8mb4' => true,
'updater.release.channel' => 'stable',
'auth.bruteforce.protection.enabled' => false,
);
The output of your Apache/nginx/system log in /var/log/____
:
Nothing unusual