MySQL Forums
Forum List  »  General

MySQL 5.5.40 - Memory leak ?
Posted by: A B
Date: June 18, 2015 02:25AM

Hello,


I have a dedicated server to my database (Gentoo Linux - Kernel 3.18.9 Hardened - MySQL 5.5.40) : this server has 256 GB of DDR3 ECC memory.
During the night of 16 June, the kernel killed MySQL because it was consuming too much memory (oom killer).
When the problem start, I was backuping a large database (200 Gb) and I was running three bots.
I don't think it's related to the backup : I launched the same backup on a slave and the memory has not moved during the backup.
I don't think it's related to the bots : they have not been modified.


After restarting MySQL, the memory has not exceeded 20% usage during the day (command to check the memory: 'ps aux --sort -rss | grep mysqld | grep -v grep').
During the night of June 16th to 17th, the memory usage increased by 20% to 70%. The day of June 17, the memory usage increased to 82%.


With 'SHOW ENGINE INNODB STATUS;', I see :
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 140660178944; in additional pool allocated 0
Dictionary memory allocated 19920926
Buffer pool size 8388607
Free buffers 0
Database pages 6514225
Old database pages 2404645
Modified db pages 180
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 41249589, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 46485961, created 785586, written 4336996
0.00 reads/s, 0.15 creates/s, 17.08 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 6514225, unzip_LRU len: 1845732
I/O sum[997]:cur[0], unzip sum[221]:cur[0]

140660178944 is different from the 82% given by 'ps aux'.
Is 'Total Allocated memory' is the total memory used by MySQL ?


Here is my configuration file :
character-set-server = utf8
user = mysql
port = 3306
socket = /var/run/mysqld/mysqld.sock
pid-file = /var/run/mysqld/mysqld.pid
log-error = /var/log/mysql/mysqld.err
basedir = /usr
datadir = /var/lib/mysql
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 100M
table_open_cache = 1000
table_definition_cache = 1000
sort_buffer_size = 20M
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
language = /usr/share/mysql/english
lc_messages_dir = /usr/share/mysql
lc_messages = en_GB
sql-mode = "traditional"
max_heap_table_size = 2G
tmp_table_size = 2G
innodb_file_format = Barracuda
max_connections = 350
query_cache_limit = 128M
query_cache_size = 2G
query_cache_type = 1
expire_logs_days = 10
sync_binlog = 1
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 60
log-queries-not-using-indexes
log-slow-admin-statements
thread_cache_size = 2000
bind-address = 192.168.0.10
log-bin = logmaster
log-bin-index = logmasterindex
relay-log = logrelay
relay-log-index = logrelayindex
binlog_format = MIXED
server-id = 1
tmpdir = /tmp/
innodb_buffer_pool_size = 128G
innodb_additional_mem_pool_size = 4G
innodb_data_file_path = ibdata1:50M:autoextend:max:100G
innodb_log_file_size = 500M
innodb_log_buffer_size = 8M
innodb_log_files_in_group = 2
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_io_capacity = 200
innodb_file_per_table

I have big values for 'max_heap_table_size' and 'tmp_table_size' but queries that need were not running when the problem occurred.
Does anyone have an idea for my problem ?

I look forward to your response.

Options: ReplyQuote


Subject
Written By
Posted
MySQL 5.5.40 - Memory leak ?
A B
June 18, 2015 02:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.