Too many connections

From XMBdocs

This "How To" will help you to come to grips with the "Too many connections error" you may receive from time to time when accessing your forums.

From the MySQL manual:

A.2.6 Too many connections Error

If you get the error Too many connections when you try to connect to MySQL, this means that there is already max_connections clients connected to the mysqld server.

If you need more connections than the default (100), then you should restart mysqld with a bigger value for the max_connections variable.

Note that mysqld actually allows (max_connections+1) clients to connect. The last connection is reserved for a user with the SUPER privilege. By not giving this privilege to normal users (they shouldn't need this), an administrator with this privilege can log in and use SHOW PROCESSLIST to find out what could be wrong. See section SHOW PROCESSLIST.

The maximum number of connects MySQL is depending on how good the thread library is on a given platform. Linux or Solaris should be able to support 500-1000 simultaneous connections, depending on how much RAM you have and what your clients are doing.

" That makes no sense to me, Daf! What does it mean!?"

Bottom line?

Your host has reached the maximum number of MySQL connections - due to other accounts on the same server or lack of available resources - and you're blocked from connecting and retrieving your data. They have exceeded their MySQL resources and will need to make configuration adjustments to allow more connections.

You can do 3 things at this point.

  1. If you have root access to the server, su in, and run killall mysqld -9 and then restart MySQL.
  2. Wait ... and there's a good chance that, in time, you will grab an open connection - probably during a "non peak" time.
  3. Contact your host and report the error. It's possible that they will be able to reconfigure their MySQL server to allow more connections and this will help during "peak" times.