We got the database hanging twice already and trying to find a cause.
show processlist
Waiting for global read lock | INSERT INTO {myisam_table} ...
In here the disk space was full so we thought the problem was over after giving it some more but the next day at midday it hanged again:
show processlist
Waiting for table level lock | UPDATE {myisam_table} ...
What could be causing it?
Mysql Default Engine: InnoDB.
Database has a mixture of tables with both MyISAM and InnoDB engines.
Log posted here:
http://arturito.net/2013/08/28/mysql-waiting-for-table-level-lock-errors/
Best Answer
INITIAL OBSERVATIONS
JOIN
,GROUP BY
, orORDER BY
WORKING THEORY
If you ran out of diskspace with the process list you gave me, then we can place blame on the MyISAM storage engine. Why?
In your particular case, it is not one of your tables. If a
JOIN
,GROUP BY
, orORDER BY
was being executed and a temp table was being written to disk (on disk temp tables use the MyISAM storage engine) the MySQL simply freezes when out of space. How do I know that ?According to MySQL 5.0 Certification Study Guide
Page 408,409 Section 29.2 Bulletpoint 11 says:
I have discussed this situation before
Apr 05, 2013
: "Site Offline" MySQL server failing to start and stopDec 17, 2012
: How to solve MySQL “The table is full” error 1114 with Amazon RDS?Apr 25, 2012
: Very Large Log FilesMar 15, 2012
: Why do MySQL tables crash? How do I prevent it?Something tells me that you have one of these two situations
/tmp
in the root partition, that's running out of spaceSUGGESTIONS
Suggestion #1: Map tmpdir to another disk
Suggestion #2: Create a RAM Disk
Run this code to install a RAM disk that will available on Linux reboot.
Then, map tmpdir to
/var/tmpfs
GIVE IT A TRY !!!