MySQL Forums
Forum List  »  General

Re: Finding the cause of a crashed table
Posted by: Rick James
Date: January 16, 2015 02:33PM

> "150110 13:01:38 InnoDB: Database was not shut down normally!"

Crash? Or some script that does not do a graceful shutdown? You should find what is causing it.

> This can consume a large amount of memory to such an extent that there is not enough memory for other applications to execute

If so much RAM is in use that swapping occurs, MySQL will be slowed down terribly. If necessary, we can probably lower some of MySQL's tunables to free up memory. If you are all MyISAM, then key_buffer_size is the main one. How much RAM do you have? How much is available after accounting for all the other applications?
For further details, please provide
SHOW VARIABLES;
SHOW GLOBAL STATUS;
I'll analyze what you have.

> I've disabled this and now rely only on replication for DB backups.

That is 'reasonable'.

> There are generally several million queries each day.

That's an average of a several dozen per second. If the queries are 'simple', then there should be no problem.

> Two tables usually crash, one that is mostly used for select statements and the othe mostly for insert statements. I'd say they each get used about 50% of the time.

If you can't prevent abnormal shutdowns, you should seriously consider switching all tables from MyISAM to InnoDB -- InnoDB is self-repairing. See
http://mysql.rjweb.org/doc.php/myisam2innodb
Old documents suggest that MyISAM is better, but that is "old" information.

> I guess I'll have to do some reading again with regards to differences between InnoDB and MyISAM. While I'm doing that, off the bat, what are the implications for changing from MyISAM to InnoDB?

The link above covers most of what you need to know. (Even though it is dated "Oct, 2012", it is still valid for all MySQL versions in the last decade.)

Options: ReplyQuote


Subject
Written By
Posted
Re: Finding the cause of a crashed table
January 16, 2015 02:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.