Moodle 2.0.2 (Build: 20110221)
cPanel Version | 11.30.2 (build 1) |
Theme | bluehost |
Apache version | 2.2.20 |
PHP version | 5.2.17 |
MySQL version | 5.1.58-community-log |
Architecture | x86_64 |
Operating system | linux |
I recently installed Moodle 2.0.2 on a shared server (chez Bluehost) using cPanel. When large numbers of students are active, we are frequently seeing the following error message:
Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
Warning: mysqli::close()[mysqli.close]: Couldn't fetch mysqli in /home2/riabaco1/public_html/lingualucida/learning/lib/dml/mysqli_native_moodle_database.php on line 336
In the mysqli_native_moodle_database.php, lines 125 to 146 are as follows (line 336 is $this->mysqli->close();):
/**
* Close database connection and release all resources
* and memory (especially circular memory references).
* Do NOT use connect() again, create a new instance if needed.
*/
public function dispose() {
parent::dispose(); // Call parent dispose to write/close session and other common stuff before closing connection
if ($this->mysqli) {
$this->mysqli->close();
$this->mysqli = null;
}
}
There are various discussions in the forum about how to solve this error message, but I am unsure which suggestions apply in my case. Encoding for this file is utf-8, by the way.
I have another installation of Moodle (1.9.10) on this website, and I've seen talk of possible database conflicts (??).
As ever, any help much appreciated.
David