Too many connections - site crash


Pmaurer

no, i'm pretty sure i'm not using pconnect for either of those.... :?

thorn

Hello,

looks fine at all, ... but i'am not a db-professional.

Do you use persistent connection (pconnect) in Coppermine or xmb? --> deactivate

thorn.
[url=http://nettest.thekk.de/doku.php]Projekte[/url]

Pmaurer

Variables
connect_timeout = 10
max_connections = 600
max_user_connections = 60
open_files_limit = 33378
table_cache = 16384
version = 5.0.45-community-log
version_comment = MySQL Community Edition (GPL)
version_compile_machine = x86_64
version_compile_os = unknown-linux-gnu

Status
Max_used_connections = 17
Open_files = 9393
Open_streams = 0
Open_tables = 5437

thorn

Hello,

can you fetch some mysql-settings from your db, just to check whether the settings are ok.
Please add a page from type CODE, and copy&paste this code into it

echo "Variables<br>";
$query = $database->query("SHOW VARIABLES WHERE Variable_Name RLIKE
'(table_cache|max_connections|max_user_connections|open_files_limit|connect_timeout|^version.*)'");
if($query->numRows() > 0) {
  while($res = $query->fetchRow()) {
    echo "{$res[0]} = {$res[1]}<br>";
  }
}
echo "<br>Status<br>";
$query = $database->query("SHOW STATUS WHERE Variable_Name RLIKE
'(Max_used_connections|^Open_.*)'");
if($query->numRows() > 0) {
  while($res = $query->fetchRow()) {
    echo "{$res[0]} = {$res[1]}<br>";
  }
}


Since mysql 5.1, it's possible to set 'quotas' per user (max_connections, max_user_connections, max_updates, max_questions in mysql.user).
See http://dev.mysql.com/doc/refman/5.1/en/user-resources.html
Maybe your hoster make use of this?

thorn.
[url=http://nettest.thekk.de/doku.php]Projekte[/url]

Pmaurer

my site is http://chevelleonline.net/wb/:
to be honest, i dont know what version of wb i'm running.
-xmb is the forum program i use
-the only other software i'm using is Coppermine gallery for photos.


BerndJM

ummmh ...
a "nice" question ....
I don't think, that you're able to de-activate the one or other functionality in your website, to have a look what happens?

Maybe it would be a good idea to tell us a little bit more about your configuration:
- what WB Version you use
- which modules you've installed
- what a server enviroment we're talking about
- what's this "XMB-forums"
- is there a URL to have a look at your site

Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

Pmaurer

okay.....but how do i remedy the problem?

BerndJM

Hi,

I think, this is the important part of your post:

QuoteIt isnt just the wb portion of the site that crashes either....it's everything (XMB forums, etc)

Why? - Really simple:
the reason for the message "Too many connections ..." is mainly because database-connections are'nt proberly closed.
I (me personally) don't know a hoster who set a lower limit to the mysql-connections as the default is (because it's not necessary).
I never seen a WB installation that causes this problem..

Maybe a "third-party-software" makes this problem (XMB forums?) ...
Maybe you're using a module in your WB-installation which doesn't use the "build-in" database connectivity mechanism ...

Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

Pmaurer

I searched for another thread like this...but none were related to this problem.

At least 3 or 4 times a week my site goes down and i get this error:

Warning: mysql_connect() [function.mysql-connect]: Too many connections in /home/chevell1/public_html/wb/framework/class.database.php on line 61
Too many connections

It isnt just the wb portion of the site that crashes either....it's everything (XMB forums, etc)

Is there any way to fix this? I've already spent weeks yelling at my Host and they just directed the problem here :-|. thanks in advance!