hey Guys, I keep getting this error : "can't connect to server too many (my)sql connections" How do I fix this ? I have looked in config.php and .ini etc and I can't find where to adjust the number of connections .... It's a drupal CMS script that keeps getting the error and I am on a dedicated server with Hostgator. if you need more details i can supply them. Thanks, Jason
You need to increase number of mysql connections limit in my.cnf. For more info see http://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html
OK thanks for that, to stop it all I have done is turn off my RSS aggregater and in turn turn off the auto ping service, because I was grabbing 100 plus feeds an hour and then pinging the 4 main services, I guess right there is an issue .... Thanks, Jason
Also be sure that you're using mysql_close(); at the end of your documents. This will make sure there aren't too many connections open at once
yes, these are all good suggestions. You may also want to run "top" from your ssh client and watch your available RAM. believe it or not, but if you don't have enough RAM available, swapdisk tends to cause bigs problems, high load averages, mysql connection problems, etc. I had this problem also a few years back. I doubled the Ram and now the server is still asking for more.. you can never have too much ram on your machine - just check your usage and see what yours looks like