Wallpapers Forums Login

Getting Error: Warning: mysql_connect() [function.mysql-connect]: Too many connections in

The other day a customer reported trouble with their site. The error they were getting was:

Warning: mysql_connect() [function.mysql-connect]: Too many connections in

I am not sure what really fixed it but this is what I did.

Since then, I haven't seen the error.

- UPDATE: I wanted to know more about this error. In researching I found out what was causing this error. the guilty one was Google. At the time I was getting this error, Google was crawling my site. I was able to find like 15 diffrent Google IP's crawling my site at the same time, which cause an overload on my server. I also added the following code at the end of my scrpt to make sure I close all mysql connection on every page:

mysql_close($mysql_connection);

* $mysql_connection = whatever variable you use to connect to your mysql. 

 


Check this out, this might help
http://us3.php.net/manual/en/function.mysql-pconnect.php

Wallpapers | Forums | Terms Of Service

copyright © 2014 wallpaperama - All Rights Reserved - Last Updated Wed Mar 26, 2014 (-8 GMT)
Powered by: Webune Forums V5