<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-20434908.post2277676614914560921..comments</id><updated>2009-11-03T22:44:18.391+02:00</updated><category term='MongoDB'/><category term='Vista'/><category term='Delver'/><category term='MySQL'/><category term='MySQL Connector'/><category term='Chrome'/><category term='Linux'/><category term='Mac'/><category term='SQL Server'/><category term='Misc'/><category term='Databases'/><category term='Windows'/><category term='Google'/><category term='InnoDB'/><title type='text'>Comments on Rational Relational: How To Perform a Connection Massacre</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.shlomoid.com/feeds/2277676614914560921/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html'/><author><name>Shlomo Priymak</name><uri>https://profiles.google.com/116089576530899793016</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-MBtwyrFVHws/AAAAAAAAAAI/AAAAAAABFDw/7IPBTg5WJWE/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20434908.post-8044611341339597144</id><published>2008-07-23T12:29:00.000+03:00</published><updated>2008-07-23T12:29:00.000+03:00</updated><title type='text'>Thank you very much for this command line :&lt;br&gt;&lt;br...</title><content type='html'>Thank you very much for this command line :&lt;BR/&gt;&lt;BR/&gt;for PID in `mysql -u user -ppass -e "show processlist" | grep Sleep | cut -f1`&lt;BR/&gt;do&lt;BR/&gt;mysql -u user -ppass -e "kill $PID"&lt;BR/&gt;done&lt;BR/&gt;&lt;BR/&gt;Before I did all manually, thank you !!&lt;BR/&gt;&lt;BR/&gt;Fatiha</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/8044611341339597144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/8044611341339597144'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1216805340000#c8044611341339597144' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1946152854'/></entry><entry><id>tag:blogger.com,1999:blog-20434908.post-3957704631500710111</id><published>2008-06-13T20:18:00.000+03:00</published><updated>2008-06-13T20:18:00.000+03:00</updated><title type='text'>There is a snippet on the Forge site that uses a S...</title><content type='html'>There is a snippet on the Forge site that uses a Stored Proc &amp; Cursor to kill long running queries (contributed by Matt Montegomery).  To make this a fully automated query killer all you need to do is setup an Event :)&lt;BR/&gt;&lt;BR/&gt;http://forge.mysql.com/tools/tool.php?id=106</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/3957704631500710111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/3957704631500710111'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1213377480000#c3957704631500710111' title=''/><author><name>Sean</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1800658546'/></entry><entry><id>tag:blogger.com,1999:blog-20434908.post-7883084012101766</id><published>2008-06-13T05:21:00.000+03:00</published><updated>2008-06-13T05:21:00.000+03:00</updated><title type='text'>was not only ugly, but wrong... corrected:&lt;br&gt;&lt;br&gt;...</title><content type='html'>was not only ugly, but wrong... corrected:&lt;BR/&gt;&lt;BR/&gt;mysql -B -e "SHOW FULL PROCESSLIST;"| tee /tmp/mysqlprocesslist`date "+%Y-%m-%dT%H:%M:%S"` | grep -Ewv "Sleep|INSERT|UPDATE|REPLACE|Binlog Dump|NULL|Command" | grep SELECT | sort -n -r -k 6 | head -n 100 | awk -F \\t '{print $1,$6}' | grep -v " [1-2][0-9]"$ | grep -v " [0-9]"$ | awk '{print $1}' | xargs | sed 's/ /,/g' | xargs mysqladmin kill</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/7883084012101766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/7883084012101766'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1213323660000#c7883084012101766' title=''/><author><name>brad</name><uri>http://www.blogger.com/profile/15013103275992833014</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1636461478'/></entry><entry><id>tag:blogger.com,1999:blog-20434908.post-4207251697708897029</id><published>2008-06-13T04:36:00.000+03:00</published><updated>2008-06-13T04:36:00.000+03:00</updated><title type='text'>It&amp;#39;s not pretty and it&amp;#39;s only for the &amp;#39...</title><content type='html'>It's not pretty and it's only for the 'nix-minded, but I've found this useful when caught in the precarious position of needing to kill a number of uncooperative selects (in the case below batches of longest running 100, running &gt;=30s)...&lt;BR/&gt;&lt;BR/&gt;mysql -B -e "SHOW FULL PROCESSLIST;"| tee /tmp/mysqlprocesslist`date "+%Y-%m-%dT%H:%M:%S"` | grep -Ewv "Sleep|INSERT|UPDATE|REPLACE|Binlog Dump|NULL|Command" | grep SELECT | sort -n -r -k 6 | head -n 100 | awk -F \\t '{print $1,$6}' | grep -v [1-2][0-9]$ | grep -v " [0-9]"$ | xargs mysqladmin kill</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/4207251697708897029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/4207251697708897029'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1213320960000#c4207251697708897029' title=''/><author><name>brad</name><uri>http://www.blogger.com/profile/15013103275992833014</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1636461478'/></entry><entry><id>tag:blogger.com,1999:blog-20434908.post-8698290901747250717</id><published>2008-06-13T03:01:00.000+03:00</published><updated>2008-06-13T03:01:00.000+03:00</updated><title type='text'>Anonymous: Yes, it actually is a new addition in 5...</title><content type='html'>Anonymous: Yes, it actually is a new addition in 5.1. Look at this manual page, in both 5.0 and 5.1 versions:&lt;BR/&gt;http://dev.mysql.com/doc/refman/5.1/en/information-schema.html&lt;BR/&gt;http://dev.mysql.com/doc/refman/5.0/en/information-schema.html&lt;BR/&gt;There are a lot more tables in the new soon-to-be-GA-nearly-almost-no-critical-bugs version.&lt;BR/&gt;&lt;BR/&gt;Sheeri: Well, nothing beats a good linux command line :) Unfortunately, If you're working with windows as your client side, most of these tools are not available by default.&lt;BR/&gt;&lt;BR/&gt;Arjen: Yes, I agree. I've added the "Sleep" condition as just an example to emphasize the fact this is a regular table which can be queried against - maybe not the best example at that.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/8698290901747250717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/8698290901747250717'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1213315260000#c8698290901747250717' title=''/><author><name>Shlomo Priymak</name><uri>http://www.blogger.com/profile/08509735030020026930</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-529265143'/></entry><entry><id>tag:blogger.com,1999:blog-20434908.post-1443622271697448679</id><published>2008-06-13T02:35:00.000+03:00</published><updated>2008-06-13T02:35:00.000+03:00</updated><title type='text'>The sleeping connections is just a bad example. It...</title><content type='html'>The sleeping connections is just a bad example. It means either persistent connections have been used where they shouldn't have, or the app is behaving silly. Easy MySQL-side workaround for this is&lt;BR/&gt;SET GLOBAL wait_timeout=10;&lt;BR/&gt;&lt;BR/&gt;No need to mess with scripts of any kind, anyway ;-)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/1443622271697448679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/1443622271697448679'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1213313700000#c1443622271697448679' title=''/><author><name>Arjen</name><uri>http://www.blogger.com/profile/10094246971103644167</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-201049900'/></entry><entry><id>tag:blogger.com,1999:blog-20434908.post-8558727814269124318</id><published>2008-06-12T23:26:00.001+03:00</published><updated>2008-06-12T23:26:00.001+03:00</updated><title type='text'>(that example is for killing queries in the Sleep ...</title><content type='html'>(that example is for killing queries in the Sleep mode)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/8558727814269124318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/8558727814269124318'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1213302360001#c8558727814269124318' title=''/><author><name>Sheeri K. Cabral</name><uri>http://www.blogger.com/profile/13990877688502800403</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1501295007'/></entry><entry><id>tag:blogger.com,1999:blog-20434908.post-2725435863019005914</id><published>2008-06-12T23:26:00.000+03:00</published><updated>2008-06-12T23:26:00.000+03:00</updated><title type='text'>For older systems, you can always use the commandl...</title><content type='html'>For older systems, you can always use the commandline, combining mysql -e "show processlist" with grep for filtering and cut for getting the processid.  I've done this often, with a shell script like:&lt;BR/&gt;&lt;BR/&gt;for PID in `mysql -u user -ppass -e "show processlist" | grep Sleep | cut -f1`&lt;BR/&gt;do&lt;BR/&gt;mysql -u user -ppass -e "kill $PID"&lt;BR/&gt;done</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/2725435863019005914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/2725435863019005914'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1213302360000#c2725435863019005914' title=''/><author><name>Sheeri K. Cabral</name><uri>http://www.blogger.com/profile/13990877688502800403</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1501295007'/></entry><entry><id>tag:blogger.com,1999:blog-20434908.post-1536419682819699350</id><published>2008-06-12T21:07:00.000+03:00</published><updated>2008-06-12T21:07:00.000+03:00</updated><title type='text'>Is that exclusive to 5.1?  I'm not seeing it in 5....</title><content type='html'>Is that exclusive to 5.1?  I'm not seeing it in 5.0.51a.&lt;BR/&gt;&lt;BR/&gt;mysql&gt; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;&lt;BR/&gt;ERROR 1109 (42S02): Unknown table 'PROCESSLIST' in information_schema</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/1536419682819699350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20434908/2277676614914560921/comments/default/1536419682819699350'/><link rel='alternate' type='text/html' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html?showComment=1213294020000#c1536419682819699350' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.shlomoid.com/2008/06/how-to-perform-connection-massacre.html' ref='tag:blogger.com,1999:blog-20434908.post-2277676614914560921' source='http://www.blogger.com/feeds/20434908/posts/default/2277676614914560921' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1670724706'/></entry></feed>
