PDA

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


King Justice
21 Aug 2008, 21:38
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
21 Aug 2008, 21:45
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
21 Aug 2008, 22:56
What do you think the recommended number for this setting should be? :confused:

max_user_connections=

Lynne
22 Aug 2008, 00:32
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
22 Aug 2008, 03:24
Contact your host as well. Many have mysql concurrent connection limits.

Marco van Herwaarden
22 Aug 2008, 09:49
There should not be any host set limits on a dedicated server. ;)

King Justice
22 Aug 2008, 23:53
What do you mean?

Videx
23 Aug 2008, 01:05
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
23 Aug 2008, 17:00
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. ;)