WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Off-Topic »
  • Too many connections - site crash
  • Print
Pages: [1]   Go Down

Author Topic: Too many connections - site crash  (Read 15919 times)

Pmaurer

  • Guest
Too many connections - site crash
« on: September 12, 2008, 04:20:43 AM »
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!

Logged

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: Too many connections - site crash
« Reply #1 on: September 12, 2008, 06:12:18 AM »
Hi,

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

Quote
It 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
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Pmaurer

  • Guest
Re: Too many connections - site crash
« Reply #2 on: September 12, 2008, 06:30:33 AM »
okay.....but how do i remedy the problem?
Logged

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: Too many connections - site crash
« Reply #3 on: September 12, 2008, 06:38:27 AM »
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
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Pmaurer

  • Guest
Re: Too many connections - site crash
« Reply #4 on: September 12, 2008, 06:56:42 AM »
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.

Logged

thorn

  • Guest
Re: Too many connections - site crash
« Reply #5 on: September 12, 2008, 05:34:14 PM »
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
Code: [Select]
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_connection s, 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.
Logged

Pmaurer

  • Guest
Re: Too many connections - site crash
« Reply #6 on: September 13, 2008, 12:17:36 AM »
Variables
connect_timeout = 10
max_connections = 600
max_user_connection s = 60
open_files_limit = 33378
table_cache = 16384
version = 5.0.45-community-log
version_comment = MySQL Community Edition (GPL)
version_compile_mac hine = x86_64
version_compile_os = unknown-linux-gnu

Status
Max_used_connection s = 17
Open_files = 9393
Open_streams = 0
Open_tables = 5437
Logged

thorn

  • Guest
Re: Too many connections - site crash
« Reply #7 on: September 13, 2008, 12:48:59 AM »
Hello,

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

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

thorn.
Logged

Pmaurer

  • Guest
Re: Too many connections - site crash
« Reply #8 on: September 13, 2008, 05:04:46 PM »
no, i'm pretty sure i'm not using pconnect for either of those.... :?
Logged

Offline maverik

  • Posts: 1572
  • Gender: Male
  • ..:: viva los tioz ::..
Re: Too many connections - site crash
« Reply #9 on: September 14, 2008, 12:56:45 PM »
have a look:

http://www.howtogeek.com/howto/linux/using-a-mysql-performance-tuning-analyzer-script/

http://www.day32.com/MySQL/

or german:

http://serversupportforum.de/forum/sql/14308-mysql-performance-tuning-mit-tuning-primer-sh-script.html



greets maverik
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Off-Topic »
  • Too many connections - site crash
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2