My drupal Web site periodically fails to connect with the database server. I don't know how often this happens, but I see it happen a couple of times a week. The site has an automatic announcement that it's not connecting. Then it comes back.

Can anyone recommend a checklist of things to investigate about this problem?

thanks

Comments

vm’s picture

The first thing I would do is report the problem to my host having them inspect the database server. Unless of course you operate your own servers.

Christefano-oldaccount’s picture

Is it "Unable to select database" or "Too many connections" or something else?

I can't say what the problem is without knowing the error, but "too many connections" is sometimes due to a bad configuration by the webhost. Apache might be configured to allow more connections from users than the MySQL server can handle (you want to configure MySQL to allow a few more connections than you allow Apache to handle).

If you're using shared hosting then you might have what's called a "bad neighbor." If you have your database served by a shared database server then it could be another site that is the cause of your problem. In this case there's not much you can do about it other than ask your webhost to move you to another server.

Chi Loop’s picture

I am getting this message at the moment. I can't see my website, i see this instead. Any idea what's wrong?

Unable to connect to database server

If you still have to install Drupal, proceed to the installation page.

If you have already finished installed Drupal, this either means that the username and password information in your settings.php file is incorrect or that we can't connect to the MySQL database server. This could mean your hosting provider's database server is down.

The MySQL error was: Too many connections.

Currently, the username is inversa1_drpl2 and the database server is localhost.

* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct hostname?
* Are you sure that the database server is running?

For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

vm’s picture

means you should check with your host to see why the database server isn't working properly. Especially if your Drupal installation was already working properly.
_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and you feed them for a lifetime

Chi Loop’s picture

It started working again on it's own. I gueses there was some problem from Bluehost's end for a while.