Neo Inspiration

Feed Rss

Mysql がクラッシュ?

10.12.2007, Database, 後で検証, by .

いきなり朝DBが落ちて 何事かと思ったら
どうもMYSQLがぶっ壊れたらしい。。。

myisamchk を走らせて

myisamchk /var/lib/mysql/*****
Checking MyISAM file: /var/lib/mysql/*****
Data records: 1996837 Deleted blocks: 0
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 client is using or hasn’t closed the table properly
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Key in wrong position at page 16121856
- check record links
myisamchk: error: Found wrong record at 147693548
MyISAM-table ‘/var/lib/mysql/***’ is corrupted
Fix it using switch “-r” or “-o”

こんな感じででてきた。

結果から言えば インデックス張りなおしで終わったのだけど

Table is marked as crashed

とかでるとあせりますw

どうもプログラム上でテーブルをつかみっぱなしだったっぽいですね。
アクセステーブルだけに秒単位でクエリが投げられてるわけですが
こんなことは初めて。

原因はこれから調査することになるわけですが、
プログラムで回避できるものなのだろうか。。

Mysql がクラッシュ? への2件のコメント

  1. 2010-08-11 at 23:11 bleu-bleut

    社内WEBを管理しているのですが、

    たびたびMySQLがダウンするという事象に悩まされていましたが、

    この記事がきっかけで解決することができました。

    ありがとうございました。

  2. コメントありがとうございます。
    少しでも参考になったら幸いです。

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>