Mariadb keeps crashing due to OOM couple or more time in a week after upgrade from MariaDB 5.5 to MariaDB 10.0.
We had upgraded one of the databases from MariaDB 5.5 to MariaDB 10.0 and ever since the upgrade the mysqld process keeps getting restarted by the OS due to out of memory issue.
The innodb_buffer_pool_size is 4GB out of around 8GB RAM.
OS version-
NAME=“Red Hat Enterprise Linux Server”
VERSION=“7.9 (Maipo)”
MARIADB version - mysql Ver 15.1 Distrib 10.0.33-MariaDB, for Linux (x86_64) using readline 5.1
The memory consumption after a restart is as below.
total used free shared buff/cache available
Mem: 7821 2969 3720 2 1131 4593
Swap: 2047 538 1509
Then the “memory used” gradually starts to increase and gets filled and consumes the swap and finally kills the mysqld again. I am not sure what is causing the crash, and i am trying to find a fix for the OOM issue.
Contents of cnf file.
[mysqld]
datadir = /data/db
innodb_buffer_pool_size = 4G
socket = /data/socket/mysql.sock
server-id = 1
log-bin = /data/log-bin/mysql-bin
expire_logs_days = 14
symbolic-links = 0
max_allowed_packet = 1024M
max_connections = 500
max_connect_errors = 10000
innodb_log_file_size =256M
-# Slow query log
slow_query_log = 1
long_query_time = 5
slow_query_log_file = /data/log/slow.queries.log
-# this is only for embedded server
[embedded]
-# This group is only read by MariaDB-5.5 servers.
-# If you use the same .cnf file for MariaDB of different versions,
-# use this group for options that older servers don’t understand
[mysqld-5.5]
-# These two groups are only read by MariaDB servers, not by MySQL.
-# If you use the same .cnf file for MySQL and MariaDB,
-# you can put MariaDB-only options here
[mariadb]
[mariadb-5.5]