Most probably, you have been a subject of a DDoS
attack.
People on this forum complain on exactly same thing with exactly same provider.
The answer is this:
VB told me it was a DOS attack - here is their message:
This is not an 'exploit'. This is a DoS attack (Denial of Service). Unfortunately there is nothing we can do about this. DoS attacks can only be fought at the server or router level, and this is the responsibility of your host. Instead of doing this they have decided to take the easy way out and suspend your account.
If you cannot get them to take this seriously, then you should look for another host. Sorry for the bad news.
A possible workaround can be this: if your connection fails with mysql_connect(): Too many connections
, you don't quit, but instead sleep()
for half a second and try to connect again, and exit only when 10
attempts fail.
It's not a solution, it's a workaround.
This of course will delay your page loading, but it's better than an ugly too many connections
message.
You also can come with a some kind of a method which tells bots and browsers apart.
Like, set a salted SHA1
cookie, redirect to the same page and then check that cookie and connect to MySQL
only if the user agent had passed the test.