Best practice forum (Archived)

Random (?) Error: Database connection failed

 
Patrick Staengle
Random (?) Error: Database connection failed
by Patrick Staengle - Monday, 3 July 2017, 7:04 AM
 

Hi everyone,

I've set up a installation of Totara 2.9.9 on my webserver and encountered the following error, which appears sometimes, randomly as it seems:



I alrealy took a look here , but it doesn't seem to be a problem with the config.php, since the site is running just fine and really smooth until this error appears out of nowhere. I tried to reproduce it, but I didn't find a way to force the error to appear, which makes finding a solution almost impossible.

Any advice on how to solve this problem would be greatly appreciated!

Thank you very much

Best regards
Patrick


Craig Eves
Re: Random (?) Error: Database connection failed
by Craig Eves (Totara Support) - Tuesday, 4 July 2017, 2:53 PM
Group Totara

Hi Patrick

This does sound like the server configuration isn't quite right - there are settings in the config fields that can be changed depending on the database used. eg max_connections.

The error logs of the database server and web  server should be able to provide some more information on the connection error such as too many clients already. Are you able to contact your partner to have a look at this?

regards

Craig


Patrick Staengle
Re: Random (?) Error: Database connection failed
by Patrick Staengle - Wednesday, 5 July 2017, 10:47 PM
 

Hi Craig,

thank you for getting back to me.

As it tourned out our webserver had only 1GB of RAM allocated to our totara installation, after upgrading to 4GB everything works without any issues.

Best Regards,
Patrick