Blog
Notes on running MySQL and MariaDB in production: lock waits, the metadata lock queue, purge lag, AUTO_INCREMENT limits and replication.
-
ERROR 1040 Too many connections: getting back into a full MySQL server
Once max_connections is full, MySQL turns away new clients, you included. The reserved admin slot, the admin port, and finding who holds the slots.
-
Why KILL QUERY didn't release the row lock
A MySQL thread asleep in an open transaction keeps its row locks, and KILL QUERY can't touch it. Finding that thread, ending it, and stopping the next one.
-
One ALTER TABLE can stop every query on a MySQL table
A migration waiting for a metadata lock queues each later query on its table. Finding the forgotten transaction behind it and keeping it from coming back.