Cron.php taked very long after updating to 25.0.0

Since the update running the cronjob takes very long (>10 min) whereas before the update, it usually completed within seconds. What are the steps I can go to troubleshoot this problem? I can’t find any errors in the logs and cron.php does not give any output (I assume that’s normal).

Also, when monitoring in htop, cron.php does not consume much CPU at all.

Nextcloud version (eg, 20.0.5): 25.0.0
Operating system and version (eg, Ubuntu 20.04): DSM 7.1.1-42962
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.51
PHP version (eg, 7.4): 7.4

The issue you are facing:

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

Steps to replicate it:

  1. Have Nextcloud instance
  2. Upgrade to 25.0.0
  3. Run cron.php

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

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => '',
    1 => '',
  ),
  'datadirectory' => '/volume1/web/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.0.18',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'skeletondirectory' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'DE',
  'app_install_overwrite' => 
  array (
    0 => 'occweb',
    1 => 'groupfolders',
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'updater.release.channel' => 'stable',
  'updater.secret' => '',
  'mail_smtphost' => '',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '587',
  'mail_from_address' => '',
  'mail_domain' => '',
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
);