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
Take a look at the man page of the pt-deadlock-logger utility:
brew install percona-toolkit pt-deadlock-logger --ask-pass server_name
It extracts information from the engine innodb status mentioned above and also it can be used to create a daemon which runs every 30 seconds.
engine innodb status
daemon