> I am curious if there is a better way to restart mysql
> that would kill off any hung/long-running queries but
> not totally bring the server down. Any other ideas for
> managing a big load.

What you can do, assuming the mysql user has proper privs, is list and
kill all mysql threads running when you shut down apache.  Steps
involved:

kill apache
SQL: 'show processlist;'
..foreach id returned..
  SQL: 'kill $id;'
sleep a few
start apache

You'll have killed all running mysql threads without stopping the
server.  You could limit it to just queries of certain status as well.

Make sure not to kill the thread that's killing threads.  ;)

I'm not a mysql developer, but I would think doing this could have
negative results.  Half-completed transactions will halt replication.  I
wouldn't be surprised if you experienced some data corruption either.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to