Database Error

vivlin posted 9th of June 2008 in Community Voice. 5 comments.

I keep recieving these error message notification every 10 mins or so. I do not know what to do. Please can someone help?

 

Mysql error:
Too many connections

Debug backtrace:
Array
(
[1] => Array
(
[file] => /home/vivlin/public_html/inc/modules.inc.php
[line] => 22
[args] => Array
(
[0] => /home/vivlin/public_html/inc/db.inc.php
)

[function] => require_once
)

[2] => Array
(
[file] => /home/vivlin/public_html/inc/admin.inc.php
[line] => 23
[args] => Array
(
[0] => /home/vivlin/public_html/inc/modules.inc.php
)

[function] => require_once
)

[3] => Array
(
[file] => /home/vivlin/public_html/inc/design.inc.php
[line] => 22
[args] => Array
(
[0] => /home/vivlinco/public_html/inc/admin.inc.php
)

[function] => require_once
)

[4] => Array
(
[file] => /home/vivlin/public_html/index.php
[line] => 39
[args] => Array
(
[0] => /home/vivlin/public_html/inc/design.inc.php
)

[function] => require_once
)

)


Called script: /index.php

Request parameters:
Array
(
[profile_polls_question_1] => 1
[polls_question_2] => 1
)
 

 
Comments
·Oldest
·Top
Please login to post a comment.
DosDawg
too many connections: not a good message, how many members are on the site at the same time? might want to touch base with your hosting provider and see if it isnt something server side, and see what it is that is connecting and not releasing.

later,
DosDawg
Thanks DosDawg, The problem is there was no one logged in on my site at that the time of the message. I think some of the files may have been corrupted but I do not know how to go about tracing the errors
gameutopia
Members/Users do not have to be actually logged in to make database connections. Just viewing your site main page will look to the database for requested information. Do you have blogs, news, articles, polls, site stats, etc on your homepage and other pages? If so then this info is stored in the database. When someone visits your site whether member or guest(not logged) they are pulling info from the database which is displayed in their browser.

So it could potentially be random visitors looking see more at your site. It could be crawlers and bots, it could be anything really.

If you look at the last part about /index.php requested paramaters, it almost sounds like it's someone voting on a poll or something to do with the polls that made the connection. And unless you have made the polls block only visible to members anyone can actually vote, and over and over again if they want. Just for the heck of it really.

Most hosts do limit the number of mysql connections in a shared hosting environment. This will vary from host to host, but basically it helps keep 1 website from using all the mysql resources, and keeps say for example 20-30 connections available per account.

Anyway just some thoughts and ideas.
gameutopia, thank you for your help. Please do you have any suggestions as to what I need to do? I will really appreciate your help.
gameutopia
Do you get this error report often, once in a while or is this the first ever? I get ocassional error reports like this or similar. As long as it doesn't happen all the time it's usually not a big deal. Many times it can be attributed to your host. Maybe they are having some issues or problems. Maybe something is up with the mysql server that they are working. This could easily cause this.

You could ask them what the max mysql connections are per account. It's a fairly common question for a host. see more Like I mentioned most usually have some kind of limit per account, 20-30 maybe even 50.

If you visit your site often times you will make more than 1 connection depending on what you are doing. Maybe 3-5 connections briefly then it will drop down to 1 or 2 and if you are idle eventually maybe even 0, until you refresh or click on something else.

All I could recommend if this is the first time, don't worry too much. If you start seeing in more often and/or your site is seeing more traffic you might check with your host as mentioned. If they have it set low, you could try another, but you don't want to move your site to another if you don't have to. It is pretty easy but a little confusing the first time.

Finally there is a phpinfo file available in version 6.1x to check some of this. Just go yoursite.com/admin/phpinfo.php you will be prompted for you admin login.

Scroll down to the mysql area about 1/2 down the page. You will find persistent and active links/connections at the moment, also something like the following:
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

Possibly mysqli under it. Depending on these numbers and values you can increase some with .htaccess or php.ini depending on hosting type.

Just a few thoughts.
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.059109926223755