[groonga-dev,01296] Re: mroongaの検索時エラーについて

Back to archive index

Kouhei Sutou kou****@clear*****
2013年 4月 10日 (水) 13:45:48 JST


須藤です。

In <5164E****@rozet*****>
  "[groonga-dev,01295] Re: mroongaの検索時エラーについて" on Wed, 10 Apr 2013 13:20:48 +0900,
  磯部 和広 <k-iso****@rozet*****> wrote:

> ■結論■
> 
> SQL文の先頭に
>  flush tables;
> を付与し
>  sysctl -w vm.overcommit_memory=1
> する事でエラーが出なくなりました。

よかったです!

> また、教えて頂いたように下記を実施しました。
> 
> if ( ! egrep '^sysctl -w vm.overcommit_memory' /etc/sysctl.conf >
> /dev/null ); then
> sudo bash -c "echo -e '\n# for mroonga\nsysctl -w vm.overcommit_memory=1' \
>>> /etc/sysctl.conf"
> fi

む。sysctl.confでは「sysctl -w」をいれないはずです。

  vm.overcommit_memory = 1

だけで十分です。このままだと再起動した時にエラーになってしま
うかもしれません。

> groonga.logを調査しました。
> 
> 内部的に、mroongaの再起動が掛かっているようです。
> 
> [root @ PMJ01 mysql]# grep -B2 'mroonga 3.02 started.' groonga.log | head
> -n 21 | tail -n 11
> 2013-04-09 13:26:17.486475|C|12844700|mmap failed!!! in
> GRN_IO_SEG_REF(0x7ef87d4574a0, 169, 1)
> 2013-04-09 13:26:17.486480|e|12844700|cursor open failed
> 2013-04-09 13:26:21.354717|n|c14eb7e0|mroonga 3.02 started.
> --

なるほど!
たしかに、mroonga(のモジュール)を終了するときにgroongaのデー
タベースをすべて閉じているので、そこでFLUSH TABLES相当のこと
がおきます。

情報ありがとうございます。謎が解けました。

> エラーが起きた後に、リカバリーとして
>  flush tables;
> を実行し、エラーになったSQLを再実行しても再度エラーとなりました。

うーん、どこかにエラー情報が残っちゃっているのかもしれませ
ん。。。groongaのデータベースを閉じるときにログを出すように
しておいて、データベースを閉じたかわかるようにしておこうかし
ら。。。

-- 
須藤 功平 <kou****@clear*****>
株式会社クリアコード <http://www.clear-code.com/> (03-6231-7270)

groongaサポート:
  http://groonga.org/ja/support/
パッチ採用はじめました:
  http://www.clear-code.com/recruitment/
コミットへのコメントサービスはじめました:
  http://www.clear-code.com/services/commit-comment.html




groonga-dev メーリングリストの案内
Back to archive index