in reply to DBI mysql slow queries, hanging threads

You can catch the kill signal in your script and kill the thread on the server with this code:
my $thread_id = $dbh->{thread_id}; my $new_dbh = $dbh->clone(); $new_dbh->{InactiveDestroy} = 0; $new_dbh->do("KILL $thread_id");
(Taken from DBIx::Timeout)