By tdellaringa on
Hi there,
All of a sudden I am getting a mysql error "too many connections" for the mySQL database. I found this here:
And tried changing to pconnect, it worked for about 2 minutes, then boom, went back to too many connections. Does anyone know why I might be getting these errors? Is this something related to my host or is it drupal specific?
Please help, my site is down! :(
thanks
Tom
Comments
use InnoDB and more memory, caching
More than likely this means hits to the database are taking too long. We solved this problem by using MySQL 5 with InnoDB and then allocating enough memory to InnoDB operate the entire Drupal database in memory. Of course, this works better if you have dedicated hardware.
Make sure you turn on caching in Drupal.
You may also have a bad/slow query(ies). MySQL can be configured with an option to show slow queries in a log file though I'm not sure it does by default.
What's a rough idea of your traffic level and how big is your Drupal database?
Thanks for the suggestions.
Thanks for the suggestions. This is all very strange because we get very little traffic. It's our church web site, we see 50-60 visitors a day - next to nothing. Plus, we're on MediaTemple's gridserver package, which is supposed to be robust.
This is a new drupal site, so the database doesn't have much in it. I moved over about 40 articles and maybe 20 audio files. Again, not much. I believe caching is turned on, although I can't verify that since the site is down...
Edit: Seems to be up again, although not sure it will last. Caching is indeed on...
Also ran a status report, have all green checkmarks...(just ran cron to index site)
Drupal 5.1
Configuration file Protected
Cron maintenance tasks Last run 1 min 1 sec ago
You can run cron manually.
Database schema Up to date
File system Writable (public download method)
MySQL database 4.1.11
PHP 4.4.7
Unicode library PHP Mbstring Extension
Web server Apache/2.0.54
the host
Sounds like it's an issue with the host. I don't know what their architecture looks like but ... Unless you have a runaway module, sounds like some other user is managing to suck all the resources on your MySQL instance. ;-) Glad to hear you're back.
Thanks, I'll have to check
Thanks, I'll have to check with MT. Right now, all seems to be working fine. I can't figure if it was the pconnect or something unrelated.
HI, did you manage to fix
HI, did you manage to fix this problem?
because I'm getting same error message. I'm using MediaTemple.
Move to PostgreSQL
InnoDB is just a palliative. We had same kind of problems, moved to PostgreSQL 8.1 (now I believe it's 8.2.4) and never looked back.
The only things is, Drupal is not fast on PostgreSQL out of the box. It needs help to get there.
http://www.nabble.com/drupal.org-MySQL-database-issues-t3762647.html
a mysql issue? (MySQL error was: Too many connections.)
MySQL error was: Too many connections. Just got this message a few minutes ago... our server is hosting other non-drupal cms and php programs (joomla, coppermine) ... checking on those other sites, the same errors are displayed, as well as in phpmyadmin (coppermine site, same error of "too many connections," while joomla sites has an error message just the same)...
therefore, i believe the problem doesn't lie in drupal's caching, might be a mysql issue (phpmyadmin settings)... might even be a php settings reconfiguration... will try reloading my database... will get back on this one...
Subject: *
jerome esperanza
manila, philippines