10
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RDSで`Mysql2::Error: Incorrect key file for table '/rdsdbdata/tmp/...'; try to repair it`というエラーに対応する

Posted at

背景

一部のSQL実行時にMysql2::Error: Incorrect key file for table '/rdsdbdata/tmp/#sql_69c6_2.MYI'; try to repair itというエラーが発生するようになった.全てのSQLにおいて起きるわけではない.

問題

check table xxxしても問題なかったため,テーブルが壊れているわけではない.
原因はストレージ容量(tmpdirの容量)が不足していることだった.(tmpdirはSQL実行時の一時バッファ?)

解法

RDSのAllocated Storageを増やす.これはRDSを稼動させたまま変更することもできる.
RDSでないならば,tmpdirの余計なファイルを削除すればよさそう.

参考リンク

Modifying a DB Instance Running the MySQL Database Engine - Amazon Relational Database Service

10
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?