Your MySQL server is under heavy load or refuses any new connections because MySQL runs out of available threads. Ever wondered why?
For me the easiest way to get a first and very helpful real-time insight in what is happening in your database server is to use the show processlist statement:
mysql> show processlist; +--------+---------+-----------+-------------+----------------+------+--------------------+------------------------------------------------------------------+ | Id | User | Host | db | Command | Time | State | Info | +--------+---------+-----------+-------------+----------------+------+--------------------+------------------------------------------------------------------+ | 426144 | DELAYED | localhost | statistics | Delayed insert | 170 | Waiting for INSERT | …[Read more]