'Could not connect to the database: Too many connections'

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
xenoalien
Forum Newbie
Posts: 19
Joined: Fri Apr 04, 2008 12:11 pm
Location: Cyberspace

'Could not connect to the database: Too many connections'

Post by xenoalien »

I have a problem with my website: http://www.wallpapersearch.net that is an error on my search page that says I have too many connections. I now realize that I forgot to close the connection in my php code... :( is there a way to kill or stop all connections to the database?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: 'Could not connect to the database: Too many connections'

Post by Chris Corbyn »

This should not matter unless you're using persistent connections. PHP closes the resource itself at the end of the script. It's more likely your host have oversold too much and they do not have enough MySQL connections for everybody to use. What host are you with?
Post Reply