お世話になります。ヴィンテージ片山です。
以下環境でWebサイトを運営しております。
・apache 2.4.6
・maria-db 5.5.44
本日以下の流れでWebサイトの閲覧障害発生から復旧作業までを実施しました。
①4つの記事を本日10:00に公開設定
②本日10:00にブラウザで確認
③1分以上応答なし
④1分30秒程度で以下メッセージがブラウザに表示
Service Temporaly Unavailable
The server could not connect to the database.
⑤DBのログから再起動が正常に行えていないと判断、手動で起動し症状解消
備考
access_log、ssl_accessを確認しa-blogへの合計アクセス数は10:00:00~10:00:10で6でした。
■ご相談
なぜDBが再起動したのかログからは確認できませんでした。
原因を特定したいのですが現状手詰まりの状態です。
調査手順や改善案等ご指導いただければ幸いです。
以下エラーログとMariaDBログを載せております。
■SSL_ERROR_LOG
[Tue Feb 07 10:01:28.146500 2017] [:error] [pid 29513] [client
10.21.0.232:41728] PHP Warning: mysql_query(): MySQL server has gone away in /var/www/html/php/DB.php on line 161
■ERROR_LOG
■MariDBログ
Version: '5.5.44-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
170207 10:01:32 mysqld_safe Number of processes running now: 0
170207 10:01:33 mysqld_safe mysqld restarted
170207 10:01:39 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 4750 ...
/usr/libexec/mysqld: Query cache is disabled (resize or similar command in progress); repeat this command later
170207 10:01:39 InnoDB: The InnoDB memory heap is disabled
170207 10:01:39 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170207 10:01:39 InnoDB: Compressed tables use zlib 1.2.7
170207 10:01:39 InnoDB: Using Linux native AIO
170207 10:01:39 InnoDB: Initializing buffer pool, size = 512.0M
InnoDB: mmap(551026688 bytes) failed; errno 12
170207 10:01:39 InnoDB: Completed initialization of buffer pool
170207 10:01:39 InnoDB: Fatal error: cannot allocate memory for the buffer pool
170207 10:01:39 [ERROR] Plugin 'InnoDB' init function returned error.
170207 10:01:39 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170207 10:01:40 [Note] Plugin 'FEEDBACK' is disabled.
170207 10:01:40 [ERROR] Unknown/unsupported storage engine: InnoDB
170207 10:01:40 [ERROR] Aborting
170207 10:01:40 [Note] /usr/libexec/mysqld: Shutdown complete
170207 10:01:40 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
170207 10:02:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170207 10:02:44 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 5519 ...
/usr/libexec/mysqld: Query cache is disabled (resize or similar command in progress); repeat this command later
170207 10:02:44 InnoDB: The InnoDB memory heap is disabled
170207 10:02:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170207 10:02:44 InnoDB: Compressed tables use zlib 1.2.7
170207 10:02:44 InnoDB: Using Linux native AIO
170207 10:02:44 InnoDB: Initializing buffer pool, size = 512.0M
170207 10:02:44 InnoDB: Completed initialization of buffer pool
170207 10:02:44 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 532322651858
170207 10:02:44 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 532327894528
InnoDB: Doing recovery: scanned up to log sequence number 532333137408
InnoDB: Doing recovery: scanned up to log sequence number 532338380288
InnoDB: Doing recovery: scanned up to log sequence number 532343623168
InnoDB: Doing recovery: scanned up to log sequence number 532348866048
InnoDB: Doing recovery: scanned up to log sequence number 532354108928
InnoDB: Doing recovery: scanned up to log sequence number 532359351808
InnoDB: Doing recovery: scanned up to log sequence number 532364594688
InnoDB: Doing recovery: scanned up to log sequence number 532369837568
InnoDB: Doing recovery: scanned up to log sequence number 532375080448
InnoDB: Doing recovery: scanned up to log sequence number 532380323328
InnoDB: Doing recovery: scanned up to log sequence number 532385566208
InnoDB: Doing recovery: scanned up to log sequence number 532390809088
InnoDB: Doing recovery: scanned up to log sequence number 532396051968
InnoDB: Doing recovery: scanned up to log sequence number 532401294848
InnoDB: Doing recovery: scanned up to log sequence number 532404136882
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 1533 row operations to undo
InnoDB: Trx id counter is 1475F200
170207 10:02:44 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Starting in background the rollback of uncommitted transactions
170207 10:02:45 InnoDB: Rolling back trx with id 1475F07B, 1533 rows to undo
InnoDB: Progress in percents: 1170207 10:02:45 InnoDB: Waiting for the background threads to start
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
InnoDB: Rolling back of trx id 1475F07B completed
170207 10:02:45 InnoDB: Rollback of non-prepared transactions completed
170207 10:02:46 Percona XtraDB (
http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 532404136882
170207 10:02:46 [Note] Plugin 'FEEDBACK' is disabled.
170207 10:02:46 [Note] Server socket created on IP: '0.0.0.0'.
170207 10:02:46 [Note] Event Scheduler: Loaded 0 events
170207 10:02:46 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
170207 10:03:15 [ERROR] mysqld: Table './kyutech_cms/acms_fulltext' is marked as crashed and should be repaired
170207 10:03:15 [Warning] Checking table: './kyutech_cms/acms_fulltext'