diff --git a/lib/private/Server.php b/lib/private/Server.php index bb4e217efa3bb..84860f8c494ee 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -730,7 +730,13 @@ public function __construct($webRoot, \OC\Config $config) { if ($config->getSystemValueBool('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { if (!$config->getSystemValueBool('log_query')) { - $v = \OC_App::getAppVersions(); + try { + $v = \OC_App::getAppVersions(); + } catch (\Doctrine\DBAL\Exception $e) { + // Database service probably unavailable + // Probably related to https://github.com/nextcloud/server/issues/37424 + return $arrayCacheFactory; + } } else { // If the log_query is enabled, we can not get the app versions // as that does a query, which will be logged and the logging