HomeUnityBlogs
 
 
vivlin

Database Error

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
)
 

bad
1
good
 
 

Comments

DosDawg
DosDawg(positive) 163 days agocomment permalink
 
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
 
bad
3
good
 
 
vivlin
vivlin 162 days agocomment permalink
 
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
 
bad
1
good
 
 
gameutopia
gameutopia 161 days agocomment permalink
 
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 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.
 
bad
1
good
 
 
vivlin
vivlin 161 days agocomment permalink
 
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.
 
bad
0
good
 
 
gameutopia
gameutopia 160 days agocomment permalink
 
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. 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.
 
bad
1
good
 
 


Post a Comment

Please login to post a comment.

This Post
 
 
vivlin Blog
All Blogs
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.559273958206