Log in

View Full Version : Too many MySQL connection Error


j1mmy
12-10-2009, 11:13 PM
I'm sure many of you have come across an email error which says something along the lines of too many SQL connections etc.

I put Forward the error to my host and this is what I got:

These sort of errors usually happen when your web script has made too many connections to the MySQL server without enough disconnections hence the "too many connections" message -- mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections.

This can be prevented by turning off what is called "persistent connections". This setting can likely be found in the configuration file for your vBulletin or in the admin panel. You may want too see if this is enabled, then disable it and see if it resolves these error messages.


Where can I find the connection configuration that he mentioned?

Lynne
12-11-2009, 03:54 AM
Look in your config.php file which is in your includes directory.

j1mmy
03-06-2010, 08:21 PM
I have made changes to the config file, but I am still getting these messages?

Does this mean that sometime whenever someone is browsing the website they would come up with a 404 or something similar??

Paul M
03-06-2010, 08:34 PM
Nope, they would get a database error page.

j1mmy
03-07-2010, 04:01 PM
So when I actually disable the persistent connections via the config file, what actually happens to the MySQL connections? How does this affect it?

ChopSuey
03-07-2010, 07:54 PM
The error tells you to disable it and see if it solves the problem.

j1mmy
03-16-2010, 02:49 PM
Well, now I am getting this issue:

Database error in vBulletin 3.8.4:

Invalid SQL:

SELECT title, template
FROM template
WHERE templateid IN (6264,6265,6253,6255,6257,2247,6266,6267,6268,6688 ,4997,5001,4898,6228,6227,6229,6224,6223,6500,2253 ,2254,6453,6454,6720,6723,6732,3370,6474,6475,6476 ,6674,2263,6736,2264,2266,6310,6296,6293,6292,6309 ,6294,6295,6297,6298,6299,6300,6253,6255,6257,2247 ,6466,6462,6464,6465,6535,6536,6467,6463,6721,3972 ,3973,3988,3990,3989,3991);

MySQL Error : MySQL server has gone away
Error Number : 2006
Request Date : Tuesday, March 16th 2010 @ 08:50:09 AM
Error Date : Tuesday, March 16th 2010 @ 08:51:03 AM
Script : http://www.*******.com/calendar.php?do=add&c=1&day=2011-1-4
Referrer :
IP Address : 216.129.119.42
Username : Unregistered
Classname : vB_Database
MySQL Version :

Marco van Herwaarden
03-16-2010, 02:52 PM
Please see the manual Lost connection to MySQL server during query (http://www.vbulletin.com/docs/html/troubleshoot_mysql_goneaway)