0
Thanks

A few words of thanks would be greatly appreciated.

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



Issue


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" ...

Solution


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)

Notes


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 ...
0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled "Avoid being blocked in case of the error :TOO MANY CONNECTIONS," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).

0 Comments