Someone proposed a poor man's replication monitor using Python.
Having Python or Perl in your server doesn't really qualify as "poor man". In many cases it's a luxury, and thus, here's my shot at the problem, using a Bash shell script.
Unlike its Python-based competition, this version also checks that the slave is replicating from the intended master, and that it is not lagging behind.
These SQL procedures examine the process list and kill the queries that take more than N seconds to execute, or the connections idles for more than N seconds.
Requires MySQL 5.1 or later.
The companion events use the event scheduler to clean the process list every 30 seconds