PDA

View Full Version : Thousands of Errors via Email! Too many connections to database!?


King Justice
08-21-2008, 07:38 PM
Hello!

My site is high-traffic (I guess?). I get about 10k uniques per day to my forum and over 100k page-views from them..

I know my server can handle it:
Intel Quad Core Q6600 processor
4GB DDR2-800mhz RAM
2x 160GB 7200rpm HDD (8mb cache)

I am getting many of the following error messages via email:

Database error in vBulletin :

mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: Too many connections
../includes/class_core.php on line 311

MySQL Error :
Error Number :
Request Date : Friday, August 22nd 2008 @ 01:33:24 AM
Error Date : Friday, August 22nd 2008 @ 01:33:24 AM
Script : ../showthread.php?t=[doesn't matter]
Referrer :
IP Address : [IP of user and guest at the time]
Username :
Classname : vB_Database
MySQL Version :

What do I need to tweak to fix/prevent this error? Are there PHP config settings I should change etc?

Please help me ASAP.
Thank you.

Lynne
08-21-2008, 07:45 PM
Have you posted over in the Server Configuration (http://www.vbulletin.com/forum/forumdisplay.php?f=14) forum for help tweaking your system? Yes, there are settings you can play with, but usually there are several that kinda go together. Also, it's hard to just tell you 'oh, change this value to that value' because every server/site likes a different configuration.


This is from the manual about your issue:

mysql_connect(): Too many connections
The server has maxed out the number of MySQL connections it allows. You can try turning persistent connections off by adding this to your config.php: $config['MasterServer']['usepconnect'] = 0;


But if you still have problems after that, you will need ask your host to raise the maximum number of connections they allow.

Here is more info on that error: http://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html

King Justice
08-21-2008, 08:56 PM
What do you think the recommended number for this setting should be? :confused:

max_user_connections=

Lynne
08-21-2008, 10:32 PM
I don't have a recommendation, that's why I said to post in that forum because George is very good at making recommendations if you post all the required information he asks for (see the sticky at the top of the forum).

Videx
08-22-2008, 01:24 AM
Contact your host as well. Many have mysql concurrent connection limits.

Marco van Herwaarden
08-22-2008, 07:49 AM
There should not be any host set limits on a dedicated server. ;)

King Justice
08-22-2008, 09:53 PM
What do you mean?

Videx
08-22-2008, 11:05 PM
What does who mean? I think Marco was pointing out that if you're running a dedicated server you shouldn't have any host limits on connections. Lynne was saying that, again assuming you're running your own dedicated server, that you go read and post in another area. I was telling you to open a ticket with your host just to see what they say.

King Justice
08-23-2008, 03:00 PM
What does who mean? I think Marco was pointing out that if you're running a dedicated server you shouldn't have any host limits on connections. Lynne was saying that, again assuming you're running your own dedicated server, that you go read and post in another area. I was telling you to open a ticket with your host just to see what they say.
It's the PHP settings and MySQL settings...I did contact my host and they set it for me. I am still learning how to properly administrate my server (it is managed).

I do have full control but the settings have to have a max number/setting. I do know that after reading vbulletin.com's response. ;)