In my production error logs I occasionally see:
SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction >
SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction
You can use:
show full processlist
which will list all the connections in MySQL and the current state of connection as well as the query being executed. There's also a shorter variant show processlist; which displays the truncated query as well as the connection stats.
show processlist;