For some context, we have a really big application running on a tomcat, we have lots of ways to build custom filters, and some of them may be too slow.
The question is, there is a way i can control/kill a mysql thread directly or via tomcat(maybe thread pool)? and if there's a way to manage it from tomcat, if i kill the thread, it will kill the mysql thread too? (didn't find anything related on documentation).
I am trying to build a layer to prevent queries to stay stuck on database. For example, if a querie stay running for more than 1minute, my application can kill it(instead of me going on terminal and killing 'by hand').
Thanks in advance.