On Mon, 11 Jun 2007, Dave Shariff Yadallee -  System Administrator a.k.a. The 
Root of the Problem wrote:

> REcently my mysql  server has been overload with a lot
> of connections; in fact losing the mysql.user table and
> one whole database.

Define "losing". You lost access, or the tables got corrupted?

> How can this be prevented?

If your load is so high that the whole system is grinding to a halt, that 
indicates one or more of the following:

1) Your database isn't configured properly.
1.1) This may mean you have to allocate more memory to it in my.conf, but 
more likely,
1.2) you either have a poorly designed query somewhere in the calling 
code, or most likely
1.3) a missing index on a frequently used table

2) Your server isn't up to the job

Have you enabled logging of slow queries in my.conf to see what queries 
are taking a lot of time to execute?

What table type are you using? Is your data access mainly reads, mainly 
writes, or a combination of both? If it's both, you may benefit from using 
InnoDB tables instead of MyISAM, assuming this isn't what you are doing 
already.

The first thing to find is what queries are taking up a lot of resources 
and making sure they are running fully indexed, and/or possibly changing 
the data structure to better suit the query requirements.

Gordan


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

  • ... Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem
    • ... Gordan Bobic

Reply via email to