httpsアクセス時のDBクラッシュに関しまして

484 views
Skip to first unread message

tomo.k...@apps.vintage.ne.jp

unread,
Dec 22, 2016, 8:28:16 AM12/22/16
to a-blog cms forum
お世話になります。ヴィンテージ片山です。

以下環境で2点障害が発生しており原因が特定できずお知恵をお借りしたいです。

■サーバースペック
CPU    2コア
メモリ 4GB

■ソフトウェア
a-blog cms 2.6.0.1 / Standard
DB MariaDB 5.5.44
OS CentOS Linux release 7.1.1503

①テーブルのクラッシュが発生

httpsアクセス時MariaDBのログに以下エラーの記載がありテーブルがクラッシュしています。

以下MariaDBのログです。(テーマ名は変更しています)
Version: '5.5.44-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
161214 11:48:59 [ERROR] mysqld: Table './***_cms/acms_fulltext' is marked as crashed and should be repaired
161214 11:48:59 [Warning] Checking table:   './***_cms/acms_fulltext'

②コネクションが増えてDBが再起動する

・秒間10アクセス程度のhttpsアクセスで503エラーとなります。
・同時刻にa-blogが動作しているapacheのssl_errorにDB.phpのエラーが発生しています。
・同時刻MariaDBがcrashし自動再起動します。

■apacheのssl_accessログ
10.21.0.232 - - [22/Dec/2016:20:13:18 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.233 - - [22/Dec/2016:20:15:07 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.232 - - [22/Dec/2016:20:15:07 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.232 - - [22/Dec/2016:20:15:08 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.232 - - [22/Dec/2016:20:15:08 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.232 - - [22/Dec/2016:20:15:08 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.233 - - [22/Dec/2016:20:15:08 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.233 - - [22/Dec/2016:20:15:08 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.232 - - [22/Dec/2016:20:15:08 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.233 - - [22/Dec/2016:20:15:08 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.232 - - [22/Dec/2016:20:15:25 +0900] "GET /themes/kyutech/css/acms-admin-custom.css HTTP/1.0" 200 189772
10.21.0.232 - - [22/Dec/2016:20:15:08 +0900] "GET / HTTP/1.0" 200 13068
10.21.0.232 - - [22/Dec/2016:20:15:35 +0900] "GET / HTTP/1.0" 503 231
10.21.0.232 - - [22/Dec/2016:20:15:32 +0900] "GET / HTTP/1.0" 503 231

■apacheのssl_errorログ
[Thu Dec 22 20:15:43.338801 2016] [:error] [pid 5803] [client 10.21.0.232:32413] PHP Warning:  mysql_query(): MySQL server has gone away in /var/www/html/php/DB.php on line 161
[Thu Dec 22 20:15:43.354824 2016] [:error] [pid 5803] [client 10.21.0.232:32413] PHP Warning:  mysql_query(): Error reading result set's header in /var/www/html/php/DB.php on line 161
[Thu Dec 22 20:15:43.354974 2016] [:error] [pid 5803] [client 10.21.0.232:32413] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/php/ACMS/function.php on line 2637
[Thu Dec 22 20:15:43.359394 2016] [:error] [pid 5911] [client 10.21.0.232:32316] PHP Warning:  mysql_connect(): Connection refused in /var/www/html/php/DB.php on line 21
[Thu Dec 22 20:15:43.338936 2016] [:error] [pid 5877] [client 10.21.0.232:34365] PHP Warning:  mysql_connect(): MySQL server has gone away in /var/www/html/php/DB.php on line 21
[Thu Dec 22 20:15:43.359716 2016] [:error] [pid 5877] [client 10.21.0.232:34365] PHP Warning:  mysql_connect(): Error while reading greeting packet. PID=5877 in /var/www/html/php/DB.php on line 21
[Thu Dec 22 20:15:43.359735 2016] [:error] [pid 5877] [client 10.21.0.232:34365] PHP Warning:  mysql_connect(): MySQL server has gone away in /var/www/html/php/DB.php on line 21

■MariaDBのログ
Version: '5.5.44-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
161222 20:15:48 mysqld_safe Number of processes running now: 0
161222 20:15:49 mysqld_safe mysqld restarted
161222 20:15:58 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 5951 ...
/usr/libexec/mysqld: Query cache is disabled (resize or similar command in progress); repeat this command later
161222 20:15:59 InnoDB: The InnoDB memory heap is disabled
161222 20:15:59 InnoDB: Mutexes and rw_locks use GCC atomic builtins
161222 20:15:59 InnoDB: Compressed tables use zlib 1.2.7f
161222 20:15:59 InnoDB: Using Linux native AIO
161222 20:15:59 InnoDB: Initializing buffer pool, size = 512.0M
161222 20:16:01 InnoDB: Completed initialization of buffer pool
161222 20:16:03 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 462963215078
161222 20:16:03  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 462963215118
161222 20:16:08  InnoDB: Waiting for the background threads to start
161222 20:16:09 Percona XtraDB (http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 462963215118
161222 20:16:09 [Note] Plugin 'FEEDBACK' is disabled.
161222 20:16:09 [Note] Server socket created on IP: '0.0.0.0'.
161222 20:16:09 [Note] Event Scheduler: Loaded 0 events
161222 20:16:09 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
161222 20:16:37 mysqld_safe Number of processes running now: 0
161222 20:16:37 mysqld_safe mysqld restarted
161222 20:16:39 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 6284 ...
/usr/libexec/mysqld: Query cache is disabled (resize or similar command in progress); repeat this command later
161222 20:16:39 InnoDB: The InnoDB memory heap is disabled
161222 20:16:39 InnoDB: Mutexes and rw_locks use GCC atomic builtins
161222 20:16:39 InnoDB: Compressed tables use zlib 1.2.7
161222 20:16:39 InnoDB: Using Linux native AIO
161222 20:16:39 InnoDB: Initializing buffer pool, size = 512.0M
InnoDB: mmap(551026688 bytes) failed; errno 12
161222 20:16:39 InnoDB: Completed initialization of buffer pool
161222 20:16:39 InnoDB: Fatal error: cannot allocate memory for the buffer pool
161222 20:16:39 [ERROR] Plugin 'InnoDB' init function returned error.
161222 20:16:39 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
161222 20:16:39 [Note] Plugin 'FEEDBACK' is disabled.
161222 20:16:40 [ERROR] Unknown/unsupported storage engine: InnoDB
161222 20:16:40 [ERROR] Aborting

161222 20:16:40 [Note] /usr/libexec/mysqld: Shutdown complete

161222 20:16:42 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended

山本一道@アップルップル

unread,
Dec 24, 2016, 3:56:37 AM12/24/16
to a-blog cms forum
現在、常時SSLで利用されているのではないかと思いますが、以前は SSL は問い合わせフォームのところだけに利用するような利用が多かったことから、SSL のときにはキャッシュしないという仕様で開発されておりました。

2.6.1.3 の時点で、その点を改善し SSL 時にもキャッシュする仕様に改良しましたので、最新版にバージョンアップをご検討ください。

tomo.k...@apps.vintage.ne.jp

unread,
Dec 25, 2016, 7:42:37 PM12/25/16
to a-blog cms forum
お世話になります。ヴィンテージ片山です。

ご回答ありがとうございます。

重ねての質問ですが以下2点ご回答いただければ幸いです。

①バージョンアップに関しまして

バージョンアップを行うことにより質問させていただきました①および
②の事象は解消するという認識でよろしいでしょうか。

②キャッシュに関しまして

キャッシュがない状態で毎秒10アクセス程度の負荷が発生した程度で
DBが落ちるものなのでしょうか。サーバーのスペックが足りていないと
いうことではないのでしょうか。

以上よろしくお願いします。

山本一道@アップルップル

unread,
Dec 25, 2016, 8:39:00 PM12/25/16
to a-blog cms forum
> バージョンアップを行うことにより質問させていただきました①および
> ②の事象は解消するという認識でよろしいでしょうか。

きっと、解消されるのではないかと思われます。

> キャッシュがない状態で毎秒10アクセス程度の負荷が発生した程度で
> DBが落ちるものなのでしょうか。サーバーのスペックが足りていないと
> いうことではないのでしょうか。

どのようなサーバーなのかが分かりませんが、スペックが高かったとしても
MySQLの設定次第で同時に処理できる数は変わってきます。


まずは、バージョンアップをご検討ください。

tomo.k...@apps.vintage.ne.jp

unread,
Dec 25, 2016, 11:43:25 PM12/25/16
to a-blog cms forum
お世話になります。ヴィンテージ片山です。

ご回答ありがとうございます。

バージョンアップを行い最新版にアップデートしました。

しかしながらバージョンアップ後にキャッシュ有効化ができない症状が発生しております。

添付ファイルの通り「コンフィグ」⇒「機能設定」⇒「キャッシュ」にチェックを入れ保存を押し
「機能設定を保存しました」と表示されるのですが、再度「コンフィグ」⇒「機能設定」を表示すると
チェックが外れた状態になっております。

対処法をご存知でしたらお教えいただけませんでしょうか。
環境キャプチャ.pdf

Godai Hori

unread,
Dec 26, 2016, 1:41:45 AM12/26/16
to a-blog cms forum
ヴィンテージ 片山様

いつもお世話になっております。
アップルップルの堀と申します。

申し訳ございません。これはa-blog cmsのバグになります。
次のバージョンでは修正いたします。
現状では、config.server.phpにて、DEBUG_MODEを0に設定していただくことで、キャッシュのチェックボックスが正しく動作します。
よろしくお願いします。

tomo.k...@apps.vintage.ne.jp

unread,
Dec 26, 2016, 3:33:25 AM12/26/16
to a-blog cms forum
お世話になります。ヴィンテージ片山です。

ご回答ありがとうございます。

config.server.phpのDEBUG_MODEを0にしましたが症状が改善いたしません。

以上よろしくお願いします。

伊藤淳

unread,
Dec 26, 2016, 8:30:09 PM12/26/16
to a-blog cms forum
お世話になっております。

お返事遅くなり申し訳ございません。
一度Cookieをクリアしてお試しいただけないでしょうか?

よろしくお願いいたします。
Reply all
Reply to author
Forward
0 new messages