Avoid being blocked in case of the error :TOO MANY CONNECTIONS

Ask a question


MySQL normally allows, by default, 100 (150 since version 5.1) connections to the server ...
Meaning that the 101st user will receive the error message "too many connections" ...


If this happens to you, for whatever reason (too many web site, the code loop, ...), then:

Just know that 101th Mysql connection gives higher privilege level.. So, by logging (for example) as root, you should be able to access the server:
  • examine what happens (SHOW FULL PROCESSLIST)
  • remove connections (KILL)
  • in the worst case stop the server (SHUTDOWN)


As stated above, the 101th connection is reserved for SUPER users ... meaning that if the user set in PHP, for example, has himself thits own privilege level, all this will not work ... so better not set up a website with a extended user feature ...

If this happens, however, it only remains for you to destroy the main process (kill -9), it is best to make a check tables then ...


Backup/Restore MySQL database
MySQL - Loading a text file into ue table