PHP Error - to many connections


#1

I get almost daily 1 … 3 messages about a PHP error. I can not interpret this message. Can somebody help me with it? OC V 9.1.8 on a webspace of a hoster. Access via an Android smartphone, Mac OS, Win7 client.

PHP Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1040] Too many connections' in /home/www/owncloud/lib/private/DB/Connection.php:62 Stack trace: #0 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect() #1 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #2 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform() #3 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform() #4 /home/www/owncloud/lib/private/DB/Connection.php(144): Doctrine\DBAL\Connection->setTransactionIsolation(2) #5 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(D in /home/www/owncloud/lib/private/DB/Connection.php on line 62 PHP Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1040] Too many connections' in /home/www/owncloud/lib/private/DB/Connection.php:62 Stack trace: #0 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect() #1 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #2 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform() #3 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform() #4 /home/www/owncloud/lib/private/DB/Connection.php(144): Doctrine\DBAL\Connection->setTransactionIsolation(2) #5 /home/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(D in /home/www/owncloud/lib/private/DB/Connection.php on line 62

Seb


#2

Hey,

i did a short search like:

https://www.google.com/search?q="Too+many+connections"+"mysql"

and found quite a lot resources on this topic:

https://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html


#3

Hey Tom42,
Thanks alot! I will have to look for the cause of the many connections. The settings are correct (max_connection=150)

Seb