SHAD Posted March 12, 2010 Posted March 12, 2010 Can anyone please tell me what are the possible causes of this error? And how is it possible to prevent such errors. Warning: mysql_connect() [function.mysql-connect]: Too many connections in /home/hytrtrogenic/public_html/globalsfiles/class/class_db_mysql.php on line 46 FATAL ERROR: Could not connect to database on localhost (Too many connections) Quote
Guest Drizzle Posted March 12, 2010 Posted March 12, 2010 it means too many things are connecting to it. idk how to fix it cuz ive never gotten that error. Quote
a_bertrand Posted March 13, 2010 Posted March 13, 2010 1) Make sure you don't use pconnect to not keep persistent connections (which tend to produce this kind of errors). 2) Increase the number of possible connection on your MySQL server (however more connections means lot more memory usage). Quote
Lithium Posted March 14, 2010 Posted March 14, 2010 Complementing what a_bertrand said, i am not a fan on increasing the connections number for the same reasons he stated, so making it another point... 3) use mysql_close() more often, that if you even use it :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.