High Server load after recent update

Nextcloud version : 19.0.4
Operating system and version: CentOS Linux release 7.6.1810 (Core)
Apache or nginx version: Apache/2.4.46 (Unix)
PHP version: PHP7.4.12 - php-fpm

The issue you are facing:

I have a NextCloud installed on my VPS server (powered my DirectAdmin control panel) running on 1 dedicated core and 2 GB ram. The NextCloud is used to store my personal files and is rarely used except for upload once in a blue moon.

After updating my NextCloud to this version (19.0.4) recently, I’m facing super high server load (> 40) that is crashing my server whenever CRON is run. Most of the time, I do not even receive the CRON output email but when I did, I received this error:

PHP Notice: PDO::__construct(): send of 111 bytes failed with errno=32 Broken pipe in /*pathsnipped*/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 27

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. Just wait for CRON to run and the entire server will experience very high load / crashed.

The output of your Nextcloud log in Admin > Logging:

Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused
/home/urlsnipped/domains/urlsnipped.com/public_html/s1/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 889:


/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/DB/Connection.php - line 194:

Doctrine\DBAL\Connection->executeQuery("SELECT * FROM `oc_appconfig`", [], [], null)

/home/urlsnipped/domains/urlsnipped.com/public_html/s1/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 200:

OC\DB\Connection->executeQuery("SELECT * FROM `oc_appconfig`", [], [])

/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/DB/QueryBuilder/QueryBuilder.php - line 216:


/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/AppConfig.php - line 331:


/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/AppConfig.php - line 109:


/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/AppConfig.php - line 287:


/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/legacy/OC_App.php - line 883:

OC\AppConfig->getValues(false, "installed_version")

/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/TemplateLayout.php - line 164:


/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/legacy/OC_Template.php - line 185:

OC\TemplateLayout->__construct("error", "")

/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/Template/Base.php - line 132:


/home/urlsnipped/domains/urlsnipped.com/public_html/s1/lib/private/legacy/OC_Template.php - line 334:


/home/urlsnipped/domains/urlsnipped.com/public_html/s1/index.php - line 63:

OC_Template::printExceptionErrorPage(Doctrine\DBAL\DBALException {}, 500)

Unfortunately you didn’t provide information about your database setup and also didn’t provide your Nextcloud configuration file. Due to the fact that a DB error is logged you should check your db connection and make sure that it stays up-and-running all the time.

You also mention that the problem occurs if a cron job is run. If you e.g. haven’t configured file locking in Nextcloud, it might be possible that a locks are written to the database, which slows down the server and might also generates a high load on the database.