I'm testing out MariaDB 5.5 as a replacement for MySQL, but it seems to be leaking memory. I can't figure out what is causing the RAM usage to keep growing until oom-killer kills it. Here is the output in TOP. System has 8G RAM. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 7411 mysql 20 0 8861m 7.1g 5212 S 43.9 92.5 89:12.19 mysqld There are no active connections # mysql -e "SHOW PROCESSLIST\G" *************************** 1. row *************************** Id: 853 User: root Host: localhost db: NULL Command: Query Time: 0 State: NULL Info: SHOW PROCESSLIST Progress: 0.000 System Details # uname -a Linux idxdb-carets 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/redhat-release CentOS release 6.4 (Final) # rpm -qa MariaDB-server MariaDB-server-5.5.31-1.x86_64 # cat /etc/my.cnf [mysqld] aria_pagecache_buffer_size = 32M aria_sort_buffer_size = 32M datadir = /var/lib/mysql default_storage_engine = InnoDB innodb = FORCE innodb_buffer_pool_size = 2G innodb_file_format = barracuda innodb_file_per_table innodb_flush_log_at_trx_commit = 2 innodb_log_file_size = 128M innodb_log_files_in_group = 2 key_buffer_size = 32M log_error = /var/log/mysql/mysql.log log_queries_not_using_indexes = 1 max_allowed_packet = 16M max_connect_errors = 1000000 max_connections = 100 max_heap_table_size = 32M myisam-recover = FORCE,BACKUP open-files-limit = 65535 pid-file = /var/run/mysql/mysql.pid query_cache_limit = 1M query_cache_size = 16M query_cache_type = 2 slow_query_log = 1 slow_query_log_file = /var/log/mysql/slow.log socket = /var/lib/mysql/mysql.sock sysdate_is_now = 1 table_definition_cache = 1024 table_open_cache = 2048 thread_cache_size = 8 tmp_table_size = 32M user = mysql [mysqld_safe] nice = 0 pid-file = /var/run/mysql/mysql.pid socket = /var/lib/mysql/mysql.sock I just don't understand how it is getting up to 7G when innodb_buffer_pool_size = 2G ? There is a cron running every hour that seems to cause the memory to grow when it runs a query like
REPLACE INTO t1 SELECT * FROM t2;
And it would be fine if the memory went up during that and went back down after, but it stays high. Any ideas where I should start digging?