Database connection error

Database connection error

by Jeff Wood -
Number of replies: 5

Never happened before (site has been solid for months - running 1.4.3 - (2004083130)), but happened tonight while updating a resource.

Site displayed the following.

Any ideas?

Jeff

(I've just backed up my site and will do a mySQL repair)

Attachment error.jpg
Average of ratings: -
In reply to Jeff Wood

Re: Database connection error

by John Rodgers -
Hi Jeff:

My site has generated a similar (non-persistent) error (three times in the last 8 months, the last one was two days ago).  The last time it happened I had my service provider restart apache, which immediately fixed the problem.
In reply to John Rodgers

Re: Database connection error

by Martyn Overy -

This could be that the MySQL server is down. However, I did notice a similar problem recently when php was upgraded to the latest version. The hosting company failed to upgrade the Zend Optimizer...which meant that all my MySQL databases failed.  After reminding the hosting company to do this upgrade all worked perfectly!

"Due to incompatibility of the previous version of Zend Optimizer with PHP 4.3.10, it is strongly recommended that owners of Zend Performance Suite, Zend Accelerator, Zend Studio Server, and Zend WinEnabler, upgrade to Zend Optimizer 2.5.7. "

http://www.zend.com/store/products/zend-optimizer.php

In reply to Jeff Wood

Re: Database connection error

by Darren Smith -

Hello all.

We are getting the same with increased frequency - almost daily now. It seems to be happening when there are a lot of users on - 40+. Mmmm. A few classes were enrolling on new courses today. Does this action cause a heavy load on the server?

We are running moodle on our own server (I think red hat 9) with mysql. Perhaps mysql has a seeting somewhere we need to tweak?

The mysql logs and apache logs tell us nothing sad

Could somebody provide me with tips on how we could go about identifing the problem?

In reply to Darren Smith

Re: Database connection error

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Inside your config.php, try changing $CFG->dbpersist from true to false or vice versa.
In reply to Martin Dougiamas

Re: Database connection error

by Jeff Wood -

Tnx martin et. al.

I will try Martin's suggestion and get back to everyone.

Jeff