job to kill longer sessions in mysql code example
Example: kill mysql processlist in whose time more than 200
mysql> select group_concat(concat('KILL ',id,';')) from
information_schema.processlist where user='root' and time > 500;
mysql> source /tmp/a.txt;