What seemed to work for me was to reduce the wait_timeout and
interactive_timeout to a reasonable number, not less than 60 seconds. 90-500
should be okay.
Any processes running longer than this value will be killed.
At least you dont have connections running for thousands of seconds.

Rgds
Terence


---------------


Uptime: 90471  Threads: 10  Questions: 3071980  Slow queries: 3  Opens: 1274
Flush tables: 1  Open tables: 64 Queries per second avg: 33.955


----- Original Message -----
From: "Bryce C" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 1:14 PM
Subject: resetting mysql server "gently"


Hi,

I have a mysql + php + apache server that is under
heavy load.

I have a script that runs every minute to deterimine
if the load is above a certain value (or if swap is
high) and if so, it kills all the httpd processes,
does /etc/rc.d/init.d/mysql stop

The script then starts everything back up again.

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.

Bottom line - killing off httpd is not too bad since
users see a temporary glitch, but killing mysql seems
to give a lot problems - scripts don't like to have
the mysql server suddenly go away.

Is there a gentler way that I can "reset" mysql?

Thanks for any input, ideas, etc!



__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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