天天看點

解決mysql出現“the table is full”的問題

解決mysql出現“the table is full”的問題

 2010-12-20 09:15:17

分類: LINUX

今天中午收到mysql錯誤日志監控發來的警報,錯誤日志如下:

101209 13:13:32 [ERROR] /usr/local/mysql/bin/mysqld: The table 'test_1291870945841162' is full

通過查詢mysql官方站點:

http://dev.mysql.com/doc/refman/5.0/en/full-table.html 得知:

因為系統是linux,不存在作業系統和檔案格式的限制,通過表的名字可以得知,該表應該是個臨時表,再說資料庫裡面也查不到該表。

有這一句話很重要:

You are using the MEMORY (HEAP) storage engine; in this case you need to increase the value of the max_heap_table_size system variable. See Section 5.1.3, “Server System Variables”.

于是就修改Mysql的配置檔案/etc/my.cnf,在[mysqld]下添加/修改兩行:

tmp_table_size = 256M

max_heap_table_size = 256M

系統預設是16M,别忘記重新啟動mysql,你也可以線上動态修改該參數,經過這幾天的觀察,這個世界安靜了許多。