How to prevent Mysql routine procedure have "metadata lock wait timeout" lock the object ?

Event schedule to kill lock transaction does not help much?

Hi @lokesh123
I am trying to give high level or generic answer here,
Basically rather than killing such transactions , check which transactions are causing this conflict.
One you came across this situation, check the process list, innodb engine status and capture the set of transaction causing lock and conflict. From thereon you can try to improve the query, logic and my require code change depends upon the problem.