I agree completely with Egor!  You should not be killing your processes to 
solve load problems.  If there is a load problem 1) You need to write your 
applications better, 2) you need to have a better database structure, 3) you 
need to analyze where indexes would help you, or 4) you need a more powerful 
machine.  I know Apache has directives in the config file to tell it the 
maximum number of daemons to run.

As in real life, so it is with computers: killing never solves the real 
problem, it just make it go away for a while.

So, tune your app, tune Apache, tune MySQL, or get a bigger machine.  But DO 
NOT implement your "kill when load is high" solution.  BTW, enough "temporary 
glitches" and you won't have users any more.  People like a trouble-free web 
site: unreliability is perceived as being unprofessional, unprofessional web 
sites lose clients in a hurry.

j----- k-----

On Thursday 10 October 2002 07:56, Egor Egorov wrote:
> BC> I have a script that runs every minute to deterimine
> BC> if the load is above a certain value (or if swap is
> BC> high) and if so, it kills all the httpd processes,
> BC> does /etc/rc.d/init.d/mysql stop
>
> BC> The script then starts everything back up again.
> BC> I am curious if there is a better way to restart mysql
>
> I can say that solving performance/load problems by resetting
> SQL server or web server is a totally wrong solution.
>
> The Right Way(tm) is to fine-tune both MySQL and Apache to fit in
> memory/CPU load - this way you'll get much better performance and
> reliability!
>
> So you can take a look at
> http://www.mysql.com/doc/en/MySQL_Optimisation.html

-- 
Joshua Kugler, Information Services Director
Associated Students of the University of Alaska Fairbanks
[EMAIL PROTECTED], 907-474-7601

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