Details
-
Bug
-
Status: Needs Feedback (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6.14
-
None
-
OS - Ubuntu 20.04.6 LTS,
Maria DB Version - 10.6.14-MariaDB
-
Can result in hang or crash
-
We are facing the unexpected memory increase on the mariadb kuberenetes pod and it crashed due to OOM, even when there is less or no transaction happening on the database.
Description
Please find the details below :
OS Details:
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
MariaDB [(none)]> select @@global.version;
---------------------------------------------
| @@global.version |
---------------------------------------------
| 10.6.14-MariaDB-1:10.6.14+maria~ubu2004-log |
---------------------------------------------
1 row in set (0.000 sec)
POD NAME CPU(cores) MEMORY(bytes)
mariadb-swmk-mariadb-7449dd66c5-l4d87 mariadb-swmk-mariadb 244m 38963Mi
my.cnf:
[mariadb]
log-bin # enable binary logging
log-basename=my-mariadb # used to be independent of hostname changes
general_log = 0
general_log_file = /var/log/mysql/mariadb-general.log
log_error = /var/log/mysql/mariadb-error.log
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mariadb-slow.log
long_query_time = 1
event_scheduler = ON
log_output = FILE
lower_case_table_names=1
character-set-server=utf8
sql_mode='NO_BACKSLASH_ESCAPES'
max_connections=5000
transaction-isolation=READ-COMMITTED
innodb_strict_mode=0
innodb_buffer_pool_size=28991029248
innodb_sort_buffer_size=67108864
innodb_log_file_size=2G
innodb_log_buffer_size=256M
innodb_io_capacity=2000
innodb_read_io_threads=6
innodb_write_io_threads=6
innodb-page-size=32768
innodb_monitor_enable='YES'
innodb_print_all_deadlocks=1
innodb_flush_log_at_trx_commit = 1
innodb_flush_method = O_DIRECT
tmpdir = /var/lib/mysql/tmp
innodb_tmpdir = /var/lib/mysql/tmp
query_cache_type=0
query_cache_size=0
max_heap_table_size=134217728
tmp_table_size=134217728
table_definition_cache=4096
table_open_cache=4096
performance_schema=ON
wait_timeout=28800
expire_logs_days=5
sync_binlog=0
max_binlog_size=256M
- — Security —
ssl-ca=/etc/mysql/certificate/ca.cert
ssl-cert=/etc/mysql/certificate/server.cert
ssl-key=/etc/mysql/certificate/server.key
============================
The POD Memory used is 44Gb , The database presently using 20Mb ,
PROD [root@puusea2ahxmkutlbst1001 ~]# kubectl top pod mariadb-swmk-mariadb-7449dd66c5-l4d87 -n swmk-mdb-prd --containers
POD NAME CPU(cores) MEMORY(bytes)
mariadb mariadb 1197m 44432Mi
MariaDB [(none)]> select sum(ROUND(MEMORY_USED/1024/1024,1)) from information_schema.processlist;
-------------------------------------
| sum(ROUND(MEMORY_USED/1024/1024,1)) |
-------------------------------------
| 22.6 |
-------------------------------------
1 row in set (0.001 sec)
Unable to understand , if a total of 22Mb is used by MariaDB where did the rest of memory getting used
MariaDB [(none)]> select sum(ROUND(MEMORY_USED/1024/1024,1)) from information_schema.processlist;
-------------------------------------
| sum(ROUND(MEMORY_USED/1024/1024,1)) |
-------------------------------------
| 20.5 |
-------------------------------------
1 row in set (0.001 sec)
POD NAME CPU(cores) MEMORY(bytes)
mariadb mariadb 183m 45426Mi