[前][次][番号順一覧][スレッド一覧]

mysql:15289

From: Mikiya Okuno <Mikiya Okuno <Mikiya.Okuno@xxxxxxxxxx>>
Date: Thu, 22 Apr 2010 18:58:04 +0900
Subject: [mysql 15289] Re: ibdata1の初期値とメモリーの関係について

関口さん、

ログを見るとやはり多重起動していますね。
起動の仕方がよくないのかも知れません。

ここと
> mysqld_safe Starting mysqld daemon with databases from /mysql/var/

ここで
> InnoDB: Progress in MB:100422 18:09:28 mysqld_safe Starting mysqld


mysqldが起動してるのが分かります。

起動方法はどのようにされていますか?
-- 
奥野 幹也 
http://www.google.com/profiles/mikiya.okuno 
http://nippondanji.blogspot.com/ 
http://twitter.com/nippondanji


On 22/04/2010, at 6:29 PM, 関口一心 wrote:

> 奥野さん
> 
> 返信有難う御座います。
> 
>> mysqld_safeもろともそれらを終了させてから、ふたたび起動を試みてください。
> →ご指摘頂いた通りmysqlのプロセスをkillしました。
> shell> ps aux |grep mysqld
> root     24935  0.0  0.0   4528  1220 pts/5    S    18:03   0:00
> /bin/sh /usr/local/bin/mysqld_safe --datadir=/mysql/var
> --skip-name-resolve --pid-file=/mysql/var/testdb.pid
> mysql    25352  1.0  1.9 953780 80304 pts/5    Sl   18:04   0:01
> /usr/local/libexec/mysqld --basedir=/mysql --datadir=/mysql/var
> --user=mysql --skip-name-resolve --log-error=/mysql/var/testdb1.err
> --pid-file=/mysql/var/testdb.pid --socket=/tmp/mysql.sock --port=3306
> root     25785  0.0  0.0   3908   676 pts/5    S+   18:06   0:00 grep mysqld
> shell> kill 25352
> shell> ps aux |grep mysqld
> root     25791  0.0  0.0   3912   680 pts/5    S+   18:06   0:00 grep mysqld
> 
> この後先程と同じ作業を行ったところ、やはりInnoDBが無効の状態で起動してしまいます・・・
> エラーログに吐かれている内容は同じく、
> ご指摘のInnoDB: Unable to lock ./ib_logfile0, error: 11
> が存在します。
> 
> mysqld_safe Starting mysqld daemon with databases from /mysql/var/
> [Warning] The syntax '--log_slow_queries' is deprecated and will be
> removed in MySQL 7.0. Please use
> '--slow_query_log'/'--slow_query_log_file' instead.
> [Warning] No argument was provided to --log-bin, and --log-bin-index
> was not used; so replication may break when this MySQL server acts as
> a master and has his hostname changed!! Please use
> '--log-bin=testdb-bin' to avoid this problem.
> [ERROR] Function 'mecab' already exists
> [ERROR] Couldn't load plugin named 'mecab' with soname 'libftmecab.so.0.0.0'.
> InnoDB: The first specified data file /mysql/var/ibdata1 did not exist:
> InnoDB: a new database to be created!
> InnoDB: Setting file /mysql/var/ibdata1 size to 3072 MB
> InnoDB: Database physically writes the file full: wait...
> InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100
> 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500
> 2600 2700 2800 2900 3000
> InnoDB: Log file ./ib_logfile0 did not exist: new to be created
> InnoDB: Setting log file ./ib_logfile0 size to 256 MB
> InnoDB: Database physically writes the file full: wait...
> InnoDB: Progress in MB:100422 18:09:28 mysqld_safe Starting mysqld
> daemon with databases from /mysql/var/
> [Warning] The syntax '--log_slow_queries' is deprecated and will be
> removed in MySQL 7.0. Please use
> '--slow_query_log'/'--slow_query_log_file' instead.
> [Warning] No argument was provided to --log-bin, and --log-bin-index
> was not used; so replication may break when this MySQL server acts as
> a master and has his hostname changed!! Please use
> '--log-bin=testdb-bin' to avoid this problem.
> [ERROR] Function 'mecab' already exists
> [ERROR] Couldn't load plugin named 'mecab' with soname 'libftmecab.so.0.0.0'.
> 
> InnoDB: Unable to lock ./ib_logfile0, error: 11
> InnoDB: Check that you do not already have another mysqld process
> InnoDB: using the same InnoDB data or log files.
> InnoDB: Error in opening ./ib_logfile0
> [ERROR] Plugin 'InnoDB' init function returned error.
> [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
> InnoDB: Log file ./ib_logfile1 did not exist: new to be created
> InnoDB: Setting log file ./ib_logfile1 size to 256 MB
> InnoDB: Database physically writes the file full: wait...
> InnoDB: Progress in MB:100422 18:09:35 [Note] Event Scheduler: Loaded 0 events
> [Note] /usr/local/libexec/mysqld: ready for connections.
> Version: '5.1.35-log'  socket: '/tmp/mysql.sock'  port: 3306  Source
> distribution
> 200
> InnoDB: Doublewrite buffer not found: creating new
> InnoDB: Doublewrite buffer created
> InnoDB: Creating foreign key constraint system tables
> InnoDB: Foreign key constraint system tables created
> InnoDB: Started; log sequence number 0 0
> [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
> [ERROR] Do you already have another mysqld server running on port: 3306 ?
> [ERROR] Aborting
> 
> InnoDB: Starting shutdown...
> InnoDB: Shutdown completed; log sequence number 0 46410
> [Note] /usr/local/libexec/mysqld: Shutdown complete
> 
> mysqld_safe mysqld from pid file /mysql/var/testdb.pid ended
> 
> すみません。宜しくお願い致します。
> 
> 
> 2010年4月22日17:52 Mikiya Okuno <Mikiya.Okuno@xxxxxxxxxx>:
>> 関口さん、
>> 
>> エラーログのご呈示ありがとうございます。
>> error: 11 が出ていますね。これはMySQLのインスタンスが複数上がってしまっている
>> ときに良く出るエラーです。「Can't start server: Bind on TCP/IP port:
>> Address already in use」というエラーも同様です。
>> 
>> なので、他にインスタンスが既に起動していないかどうかをまずはご確認ください。
>> 
>> shell> pgrep mysqld
>> 
>> mysqld_safeもろともそれらを終了させてから、ふたたび起動を試みてください。
>> mysqld_safeが終了しないと、mysqldが自動的に再起動してしまうからです。
>> 
>> ではでは。
>> --
>> 奥野 幹也
>> http://www.google.com/profiles/mikiya.okuno
>> http://nippondanji.blogspot.com/
>> http://twitter.com/nippondanji
>> 
>> 
>> On 22/04/2010, at 5:37 PM, 関口一心 wrote:
>> 
>>> 奥野さん
>>> 
>>> ご返信有難う御座います。
>>> 不要の部分も御座いますが、InnoDBが有効にならずにmysqlが起動した時に吐かれているエラーログです。
>>> 
>>> 100422 17:24:23 mysqld_safe Starting mysqld daemon with databases from
>>> /mysql/var
>>> 100422 17:24:24 [Warning] The syntax '--log_slow_queries' is
>>> deprecated and will be removed in MySQL 7.0. Please use
>>> '--slow_query_log'/'--slow_query_log_file' instead.
>>> 100422 17:24:24 [Warning] No argument was provided to --log-bin, and
>>> --log-bin-index was not used; so replication may break when this MySQL
>>> server acts as a master and has his hostname changed!! Please use
>>> '--log-bin=maildb-bin' to avoid this problem.
>>> 100422 17:24:24 [ERROR] Function 'mecab' already exists
>>> 100422 17:24:24 [ERROR] Couldn't load plugin named 'mecab' with soname
>>> 'libftmecab.so.0.0.0'.
>>> InnoDB: The first specified data file /mysql/var/ibdata1 did not exist:
>>> InnoDB: a new database to be created!
>>> 100422 17:24:24  InnoDB: Setting file /mysql/var/ibdata1 size to 3072 MB
>>> InnoDB: Database physically writes the file full: wait...
>>> InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000 1100
>>> 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500
>>> 2600 2700 2800 2900 3000
>>> 100422 17:26:14  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
>>> InnoDB: Setting log file ./ib_logfile0 size to 256 MB
>>> InnoDB: Database physically writes the file full: wait...
>>> InnoDB: Progress in MB:100422 17:26:14 mysqld_safe Starting mysqld
>>> daemon with databases from /mysql/var/
>>> 100422 17:26:14 [Warning] The syntax '--log_slow_queries' is
>>> deprecated and will be removed in MySQL 7.0. Please use
>>> '--slow_query_log'/'--slow_query_log_file' instead.
>>> 100100422 17:26:14 [Warning] No argument was provided to --log-bin,
>>> and --log-bin-index was not used; so replication may break when this
>>> MySQL server acts as a master and has his hostname changed!! Please
>>> use '--log-bin=maildb-bin' to avoid this problem.
>>> 200100422 17:26:14 [ERROR] Function 'mecab' already exists
>>> 100422 17:26:14 [ERROR] Couldn't load plugin named 'mecab' with soname
>>> 'libftmecab.so.0.0.0'.
>>> InnoDB: Unable to lock ./ib_logfile0, error: 11
>>> InnoDB: Check that you do not already have another mysqld process
>>> InnoDB: using the same InnoDB data or log files.
>>> InnoDB: Error in opening ./ib_logfile0
>>> 100422 17:26:22 [ERROR] Plugin 'InnoDB' init function returned error.
>>> 100422 17:26:22 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
>>> 100422 17:26:22  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
>>> InnoDB: Setting log file ./ib_logfile1 size to 256 MB
>>> InnoDB: Database physically writes the file full: wait...
>>> InnoDB: Progress in MB:100422 17:26:22 [Note] Event Scheduler: Loaded 0 events
>>> 100100422 17:26:22 [Note] /usr/local/libexec/mysqld: ready for connections.
>>> Version: '5.1.35-log'  socket: '/tmp/mysql.sock'  port: 3306  Source
>>> distribution
>>> 200
>>> InnoDB: Doublewrite buffer not found: creating new
>>> InnoDB: Doublewrite buffer created
>>> InnoDB: Creating foreign key constraint system tables
>>> InnoDB: Foreign key constraint system tables created
>>> 100422 17:26:31  InnoDB: Started; log sequence number 0 0
>>> 100422 17:26:31 [ERROR] Can't start server: Bind on TCP/IP port:
>>> Address already in use
>>> 100422 17:26:31 [ERROR] Do you already have another mysqld server
>>> running on port: 3306 ?
>>> 100422 17:26:31 [ERROR] Aborting
>>> 100422 17:26:31  InnoDB: Starting shutdown...
>>> 100422 17:26:33  InnoDB: Shutdown completed; log sequence number 0 46410
>>> 100422 17:26:33 [Note] /usr/local/libexec/mysqld: Shutdown complete
>>> 
>>> アドバイスを宜しくお願い致します。
>>> 
>>> 
>>> 2010年4月22日17:11 Mikiya Okuno <Mikiya.Okuno@xxxxxxxxxx>:
>>>> 関口さん、
>>>> 
>>>> InnoDBが起動しない場合、その理由はエラーログに記述されています。
>>>> なのでエラーログの内容を拝見させて頂かないと何とも言えません。
>>>> もし宜しければ該当部分のログを見せて頂けますか?
>>>> 
>>>> よろしくお願いします。
>>>> --
>>>> 奥野 幹也
>>>> http://www.google.com/profiles/mikiya.okuno
>>>> http://nippondanji.blogspot.com/
>>>> http://twitter.com/nippondanji
>>>> 
>>>> 
>>>> On 22/04/2010, at 4:50 PM, 関口一心 wrote:
>>>> 
>>>>> 平塚さん
>>>>> 
>>>>> 関口です。
>>>>> 
>>>>> アドバイス有難うございます。
>>>>> 
>>>>> 前任者が設定を行っていたmy.cnf だったのでその他の設定値を良く見ずに設定をしてしまったせいで、
>>>>> そもそも
>>>>> innodb_buffer_pool + key_buffer + max_connections * (sort_buffer +
>>>>> read_buffer + read_rnd_buffer) + max_connections * 2 MB
>>>>> この値が2Gを大きく上回っていました。
>>>>> innodb_buffer_pool_size = 1536M
>>>>> この値では当然のようにNGでした。
>>>>> 
>>>>> アドバイスをきっかけに見直すことが出来ました。
>>>>> 有難う御座います。
>>>>> 
>>>>> 
>>>>> 上記作業後、疑問が生まれました。
>>>>> innodb_buffer_pool + key_buffer + max_connections * (sort_buffer +
>>>>> read_buffer + read_rnd_buffer) + max_connections * 2 MB
>>>>> この値を2G以内に抑え、
>>>>> innodb_data_file_path = ibdata1:3G:autoextend
>>>>> にしてもInnoDBが有効にならない状態で起動してしまいます。
>>>>> 
>>>>> この状態になるのは何故なのか?
>>>>> 私個人の疑問を晴らすために、皆様からのご回答をお待ちしています。
>>>>> 
>>>>> 
>>>>> 2010年4月22日12:27 HIRATSUKA Sadao <hiratsuka.sadao@xxxxxxxxxx>:
>>>>>> ひらつかです。
>>>>>> 
>>>>>> On Thu, 22 Apr 2010 11:37:08 +0900
>>>>>> 関口一心 <8888.saleen.s7@xxxxxxxxxx> wrote:
>>>>>> 
>>>>>>> 現在、linux、CentOS5.2(32ビット)、mysql5.1.35の構築を行っており、my.cnfの設定値で悩んでいます。
>>>>>>> innodb_data_file_path = ibdata1:2G:autoextend
>>>>>>> innodb_buffer_pool_size = 1536M
>>>>>> 
>>>>>> 32ビット環境でinnodb_buffer_pool_size = 1536Mは厳しいと思います。
>>>>>> innodb_data_file_pathは2Gのままで、
>>>>>> 
>>>>>> innodb_data_file_path = ibdata1:2G:autoextend
>>>>>> innodb_buffer_pool_size = 512M
>>>>>> 
>>>>>> とするといかがでしょうか。
>>>>>> 
>>>>>>> ibdata1の初期値と起動時に使用するメモリーは、
>>>>>>> どの様な依存関係にあるのかアドバイスが頂ければと思い投稿しました。
>>>>>> 
>>>>>> ソースを読んで確認したわけではないですが、
>>>>>> あまり関係ないと思います。
>>>>>> 
>>>>>> --
>>>>>> 平塚貞夫 hiratsuka.sadao@xxxxxxxxxx
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
> 


[前][次][番号順一覧][スレッド一覧]

     15273 2010-04-22 11:37 [関口一心 <8888.salee] ibdata1の初期値とメモリーの関係について 
     15277 2010-04-22 12:27 ┗[HIRATSUKA Sadao <hir]                                       
     15282 2010-04-22 16:50  ┗[関口一心 <8888.salee]                                     
     15283 2010-04-22 17:00   ┣[Akio Imai <suzuro204] Re: [mysql 15282] Re: ibdata1の初期値とメモリーの関係について
     15285 2010-04-22 17:23   ┃┗[関口一心 <8888.salee] Re: ibdata1の初期値とメモリーの関係について
     15284 2010-04-22 17:11   ┗[Mikiya Okuno <Mikiya]                                   
     15286 2010-04-22 17:37    ┗[関口一心 <8888.salee]                                 
     15287 2010-04-22 17:52     ┗[Mikiya Okuno <Mikiya]                               
     15288 2010-04-22 18:29      ┗[関口一心 <8888.salee]                             
->   15289 2010-04-22 18:58       ┗[Mikiya Okuno <Mikiya]                           
     15290 2010-04-22 19:05        ┗[HIRATSUKA Sadao <hir]                         
     15291 2010-04-22 21:36         ┗[Mikiya Okuno <Mikiya]                       
     15292 2010-04-23 18:12          ┗[関口一心 <8888.salee]