Mariadb 5.5 sever shuts down automatically after some days on CENTOS 7.

March 13, 2016 3k views
MariaDB

Mariadb server shuts down itself after some days running on centos 7.

Mariadb : 5.5.44
centos 7
RAM 2 GB (which i see only 50% usage)

following is I see at the last 100 lines of the log.

Complete dump of log here. (http://www.merochord.info/mariadb.log)

160312 20:12:30 mysqldsafe Number of processes running now: 0
160312 20:12:30 mysqld
safe mysqld restarted
160312 20:12:31 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB-log) starting as process 17041 ...
160312 20:12:31 InnoDB: The InnoDB memory heap is disabled
160312 20:12:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160312 20:12:31 InnoDB: Compressed tables use zlib 1.2.7
160312 20:12:31 InnoDB: Using Linux native AIO
160312 20:12:31 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137756672 bytes) failed; errno 12
160312 20:12:31 InnoDB: Completed initialization of buffer pool
160312 20:12:31 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160312 20:12:31 [ERROR] Plugin 'InnoDB' init function returned error.
160312 20:12:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160312 20:12:31 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
160312 20:12:31 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)
160312 20:12:31 [ERROR] mysqld: Out of memory (Needed 72499200 bytes)
160312 20:12:31 [Note] Plugin 'FEEDBACK' is disabled.
160312 20:12:31 [ERROR] Unknown/unsupported storage engine: InnoDB
160312 20:12:31 [ERROR] Aborting

160312 20:12:31 [Note] /usr/libexec/mysqld: Shutdown complete

160312 20:12:31 mysqldsafe mysqld from pid file /var/run/mariadb/mariadb.pid ended
160313 08:39:00 mysqld
safe Starting mysqld daemon with databases from /var/lib/mysql
160313 8:39:01 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB-log) starting as process 21981 ...
160313 8:39:01 InnoDB: The InnoDB memory heap is disabled
160313 8:39:01 InnoDB: Mutexes and rwlocks use GCC atomic builtins
160313 8:39:01 InnoDB: Compressed tables use zlib 1.2.7
160313 8:39:01 InnoDB: Using Linux native AIO
160313 8:39:01 InnoDB: Initializing buffer pool, size = 128.0M
160313 8:39:01 InnoDB: Completed initialization of buffer pool
160313 8:39:01 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib
logfiles!
160313 8:39:01 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: Last MySQL binlog file position 0 9491224, file name /var/lib/mysql/mysql-bin.000064
160313 8:39:04 InnoDB: Waiting for the background threads to start
160313 8:39:05 Percona XtraDB (http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 6810097075
160313 8:39:05 [Note] Plugin 'FEEDBACK' is disabled.
160313 8:39:05 [Note] Recovering after a crash using /var/lib/mysql/mysql-bin
160313 8:39:05 [Note] Starting crash recovery...
160313 8:39:05 [Note] Crash recovery finished.
160313 8:39:05 [Note] Server socket created on IP: '0.0.0.0'.
160313 8:39:05 [Note] Event Scheduler: Loaded 0 events
160313 8:39:05 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
160313 8:39:06 [ERROR] mysqld: Table './sajhamanch@002eorg/news' is marked as crashed and should be repaired
160313 8:39:06 [Warning] Checking table: './sajhamanch@002eorg/news'
160313 9:34:42 [Note] /usr/libexec/mysqld: Normal shutdown

160313 9:34:42 [Note] Event Scheduler: Purging the queue. 0 events
160313 9:34:42 InnoDB: Starting shutdown...
160313 9:34:43 InnoDB: Shutdown completed; log sequence number 6810100584
160313 9:34:43 [Note] /usr/libexec/mysqld: Shutdown complete

160313 09:34:43 mysqldsafe mysqld from pid file /var/run/mariadb/mariadb.pid ended
160313 09:34:43 mysqld
safe Starting mysqld daemon with databases from /var/lib/mysql
160313 9:34:44 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB-log) starting as process 24842 ...
160313 9:34:44 InnoDB: The InnoDB memory heap is disabled
160313 9:34:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160313 9:34:44 InnoDB: Compressed tables use zlib 1.2.7
160313 9:34:44 InnoDB: Using Linux native AIO
160313 9:34:44 InnoDB: Initializing buffer pool, size = 128.0M
160313 9:34:44 InnoDB: Completed initialization of buffer pool
160313 9:34:44 InnoDB: highest supported file format is Barracuda.
160313 9:34:44 InnoDB: Waiting for the background threads to start
160313 9:34:45 Percona XtraDB (http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 6810100584
160313 9:34:45 [Note] Plugin 'FEEDBACK' is disabled.
160313 9:34:45 [Note] Server socket created on IP: '0.0.0.0'.
160313 9:34:45 [Note] Event Scheduler: Loaded 0 events
160313 9:34:45 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-MariaDB-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server

4 Answers

I had same problem but couldn't reach a solution. All that i did was use a little monitor script (using cronjobs) to restart MariaDB if it was stopped.

I had same problem too... May be change droplets kernel? I have CentOS 7 x64 vmlinuz-3.10.0-229.20.1.el7.x86_64 now.

Hi, we update the droplet thinking that is the problem (memory limit), but we have the same problem, mariadb in centos 7 is crashed many times in the same day. But i don't have this problem in other server with the same
centos and mariadb. i don't kown what is the problem in digitalocean exactly.

Have another answer? Share your knowledge.