I have the classic many connections
error in my MySQL app:
exception 'PDOException' with message 'SQLSTATE[HY000] [1129] Host
'[IP ADDRESS]' is blocked because of many connection errors; unblock
with 'mysqladmin flush-hosts'' in /var/www/libs/Database.php:15
There's plenty written on what causes this and how to solve it by increasing the limit, but what I haven't been able to determine is how to debug my code. I'd prefer to close the connection rather than have a load in use.
Is there any way to query MySQL to determine where connections are coming from and how long they have been open?