I am working with mysql since many yaers and i have never
found e reason to kill braindead connections - what
benefit do you think to have from such actions instead
looking why there are hanging ones?

kill a connection of postfix and some user gets
"temorary lookup error", php-scripts are closing
connections after the request

if you have long living connections from php
you have "persistent connections" active - so
why do you not disable the feature if you do
not like it instead writnign dirty scripts?

Am 17.02.2011 22:16, schrieb Rafael Valenzuela:
> 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"

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to