From: Michael Dykman Date: February 17 2011 9:27pm Subject: Re: Question about performance List-Archive: http://lists.mysql.com/mysql/224454 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d58a4b31a3ae049c8110f1 --0016e6d58a4b31a3ae049c8110f1 Content-Type: text/plain; charset=ISO-8859-1 Rafael, You realize that script will kill perfectly well-behaved queries in mid-flight? If you have so many dead connections that it is interfering with operation, you have another problem elsewhere.. - md On Thu, Feb 17, 2011 at 4:16 PM, Rafael Valenzuela wrote: > Hi Michael: > > Yeah , i think that i do a shell script.something like that. > > require 'mysql' > > mysql = Mysql.new(ip, user, pass) > processlist = mysql.query("show full processlist") > killed = 0 > processlist.each { | process | > mysql.query("KILL #{process[0].to_i}") > } > puts "#{Time.new} -- killed: #{killed} connections" > > > > 2011/2/17 Michael Dykman > > from the mysql console: > show processlist >> this will show you ids of all active connections, even the dead ones >> >> then, again form the console > kill >> >> On Thu, Feb 17, 2011 at 3:52 PM, Rafael Valenzuela >> wrote: >> > Hi all; >> > I wonder if there is any tool to Performance Tuning querys. In other >> know if >> > there is any way to kill connections that take x hours dead (for example >> 1 >> > hour) >> > >> > -- >> > Mit forever >> > My Blog >> > My Faborite Web< >> http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/index.htm >> > >> > http://www.technologyreview.com/ >> > >> >> >> >> -- >> - michael dykman >> - mdykman@stripped >> >> May the Source be with you. >> > > > > -- > Mit forever > My Blog > My Faborite Web > http://www.technologyreview.com/ > > > > -- - michael dykman - mdykman@stripped May the Source be with you. --0016e6d58a4b31a3ae049c8110f1--