Nextcloud version (eg, 20.0.5): 21.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
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:
- Try and log in using chrome browser
- After entering credentials in web interface - you never get logged in.
- Sometimes I will get 504 or internal Server error after many minutes
- Access with the same account continues to work through desktop and android clients with no problems.
The output of your Nextcloud log in Admin > Logging:
php7:error] [pid 16940] [client 192.168.0.209:49926] PHP Fatal error: Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1040] Too many connections in /var/www/owncloud/lib/private/DB/Connection.php:85\nStack trace:\n#0 /var/www/owncloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\\DB\\Connection->connect()\n#1 /var/www/owncloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/owncloud/lib/private/DB/Connection.php(226): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/owncloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\\DB\\Connection->executeQuery()\n#4 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/owncloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/owncloud/lib/private/AppConfig.php(110): OC\\AppConfig->loadConfigValues()\n#7 /var/www/owncloud/lib/private/AppConfig.php(301): OC\\AppConfig->getApps()\n#8 /var in /var/www/owncloud/lib/private/DB/Connection.php on line 85
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'updatechecker' => false,
'instanceid' => '#####',
'passwordsalt' => '#####',
'secret' => '####',
'overwriteprotocol' => 'https',
'trusted_domains' =>
array (
0 => 'cloud.trebacz.com',
1 => '192.168.0.209',
2 => '192.168.0.214',
),
'datadirectory' => '/var/www/owncloud/data',
'overwrite.cli.url' => 'http://192.168.0.214',
'dbtype' => 'mysql',
'version' => '21.0.4.1',
'dbname' => 'owncloud',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc',
'dbpassword' => '####',
'default_phone_region' => 'US',
'logtimezone' => 'UTC',
'installed' => true,
'asset-pipeline.enabled' => false,
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => 'true',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
'timeout' => 0,
'dbindex' => 0,
'password' => '####',
),
'maintenance' => true,
'mail_from_address' => 'david',
'mail_smtpmode' => 'smtp',
'mail_domain' => 'trebacz.com',
'loglevel' => 2,
'log_type' => 'file',
'logfile' => 'nextcloud.log',
'logdateformat' => 'F d, Y H:i:s',
'theme' => '',
'singleuser' => false,
'mail_smtphost' => '192.168.0.213',
'mail_sendmailmode' => 'smtp',
'mail_smtpport' => '25',
'app_install_overwrite' =>
array (
0 => 'files_external_gdrive',
1 => 'gallery',
),
);
The output of your Apache/nginx/system log in /var/log/____
:
[Sun Oct 10 13:21:50.684944 2021] [mpm_prefork:notice] [pid 4257] AH00169: caught SIGTERM, shutting down
[Sun Oct 10 13:21:51.189454 2021] [mpm_prefork:notice] [pid 4811] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Sun Oct 10 13:21:51.190030 2021] [core:notice] [pid 4811] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 10 14:12:14.917091 2021] [access_compat:error] [pid 4814] [client 192.168.0.209:41552] AH01797: client denied by server configuration: /var/www/owncloud/config
[Sun Oct 10 14:12:15.739128 2021] [access_compat:error] [pid 4818] [client 192.168.0.209:41562] AH01797: client denied by server configuration: /var/www/owncloud/config