The database details specified in config.php are not correct, or the database is down.

Re: The database details specified in config.php are not correct, or the database is down.

by Martin Dougiamas -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Something similar was happening recently with moodle.org - in my case it was that PHP/Apache/MySQL was running out of database connections.

Moodle uses Persistent Connections for speed, which works 99% of the time, but see this page about it: http://www.php.net/manual/en/function.mysql-pconnect.php

The quick hack: edit lib/setup.php, look for the word PConnect and change it to Connect. Slight loss of performance but no connection problems.

The longer term solution is to change the max_user_connections setting in MySQL.