# MySQL Got error 134错误排查

## 现象

Discuz论坛一张表反复崩溃，导致帖子页无法打开，日志如下：

forum_threadaddviews修复后，mysql日志仍然在刷ERROR错误：

## 追查

Got error 134的表，几乎都是 forum_forumrecommend

forum_threadaddviews表情况，也差不多是13年8月和15年7月比较集中

## Got error 134

Even though the MyISAM table format is very reliable (all changes to a table made by an SQL statement are written before the statement returns), you can still get corrupted tables if any of the following events occur:

• The mysqld process is killed in the middle of a write.
• An unexpected computer shutdown occurs (for example, the computer is turned off).
• Hardware failures.
• You are using an external program (such as myisamchk ) to modify a table that is being modified by the server at the same time.
• A software bug in the MySQL or MyISAM code.

Typical symptoms of a corrupt table are: You get the following error while selecting data from the table:

• Incorrect key file for table: ‘…’. Try to repair it
• Queries don’t find rows in the table or return incomplete results.

## 5 thoughts on “MySQL Got error 134错误排查”

1. 所以解决办法是什么…我在 crontab 加了定时修复表的任务也没什么用，昨天又在 mysql 里加了个任务每天修复表…

• 应该是顺着oom killer继续查吧，，先观察几天吧，不行再找解决办法

• 发现是 php-fpm 子进程太多内存不够就把 mysqld 杀了…把 php-fpm.conf 里的 pm.max_children 调小点就好了

• good job

2. 错误重复出现，本文过程可能不正确