Losing connection to mySQL server

Events happening in the community are now at Drupal community events on www.drupal.org.
mdowsett's picture

I try not to post support questions here....but I couldn't find any relevant posts on drupal.org....I have issues with a Drupal 5.10 site of mine where it seems to be over-loading the MySQL server. I get the odd (too common) "Unable to connect to database" screen that you get upon installing Drupal if you don't have the database setup and the settings.php files configured properly.

I certainly have that covered as the site is about 8 months old.

I recently moved the site to a managed VPS to give it some more horse-power. I thought that maybe my 'addiction' to modules and the growing site may have grown past what I am used to...even though there are only about 50 real active users on the site and a few thousand nodes (not sure on the daily page visits...).

It just shouldn't be over-loading the database (in my opinion) with the resources the site has to it. Since it is on a managed VPS, the MySQL seems to restart very promptly and access is restored but of course the client isn't too happy seeing that (mostly when submitting new nodes).

I guess I am looking for advice on how to go about finding out what is the steps to find out what is killing MySQL...?

Comments

You need more data!

deviantintegral's picture

Install something like google analytics to see if there is a trend in when the site has traffic and when MySQL cores. Also check dmesg to see if the process is running out of memory.

You could also install snmpd and a graph generator like Cacti to track the load on the server.

Good luck!

--Andrew

Too many connections?

kbahey's picture

When this happens, does the error say "Too many connections"?

If so, then you need to configure MySQL to have the same number of connections as Apache's MaxClients.

This will ensure that there are enough MySQL connections to serve the requests.

And yes, Andrew is correct. You need to install something to monitor things. My personal favorite is Munin. To track visits, install awstats, which will give the stats that Google provides (humans) plus crawler traffic as well.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Waterloo Region Drupal Users Group

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: