title: MySQL: Is there any way to close mysql connections which are in sleep mode for more than 10 minutes
body: <p>Recently I observed on one of the production server, many connections are in sleep mode for more than 3 hours or so. I would like to whether we have a way in mysql which if we set, will automatically close these long sleeping connections.</p>
  
  <p>I have given a read like running "flush tables" manually will do this but I want it to happen automatically by mysql. is there solution as such</p>
  
  <p>If i make a script which will connect to mysql and run "flush tables" periodically, does it become a problem in any way...</p>
  
  <p>Thanks in advance...</p>