お世話になります。ヴィンテージ片山です。
以下環境で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