On our production master servers, we have noticed that mysql is using more memory than the max calculated memory by mysqltuner.sql. As a result, after three days of activity, oom-killer is restarting mysqld process. Also we have observed that mysqld is swapping even when there is enough free memory.
MySQL Version: 5.6.31-77.0
CentOS Version: 7.2.1511
Engine: InnoDB
On one of the server, the issue was resolved after downgrading to 5.6.28-76.1.
Is there a known issue of memory leak in 5.6.31? If not, what relevant info do you want to investigate this.
If you think you have a leak check the VSZ you see (“ps aux” output) and see if it is still growing after few days. If it is - it could be memory leak if not you might just have memory fragmentation settling in.
Major changes that we have done recently are as follows:
Enabled Numa
Switched to jemalloc library
Changed IO Scheduler from cfq to deadline
Started collecting stats using mysqld_exporter for prometheus
First three changes are as part of the Percona Audit recommendation. I have also attached pt-summary, pt-mysql-summary and mysqltuner output for your reference. I have omitted some information due to file size limit.
We downgraded to Percona Server 5.6.28-76.1 on 06/Sept and since then the memory utilisation has been steady and stable. Please refer to the attached image.
Any help in investigating this issue is appreciated. Please let me know if you need more info.
Just checking, could it be related to the fix that is introduced in 5.6.32-78.0?
[LIST]
[*]Fixed MYSQL_SERVER_PUBLIC_KEY connection option memory leak. Bug fixed #1604419.
[/LIST] Thanks,
Suresh
This is exactly the problem I’m having also. the bug got introduced some time after 5.6.28-76.1 and 5.6.31 was already bad but 5.6.32-78.0 is probably 2 times worse. on one of the servers 5.6.32-78.0 was leaking 100gb of ram every 24 hours. I confirm that 5.6.28-76.1 doesn’t have these issues.
Thanks for your response. We do use Audit log plugin. Is that the root cause?
We just have about 700 tables and we use FK constraints.
Did anybody test the latest version - 5.6.33-79.0?
[LIST]
[*]Fixed memory leaks in Audit Log Plugin. Bug fixed #1620152 (upstream #71759).
[/LIST] Thanks,
Suresh