MySQL5.7高版本 疑似内存泄露

I have an instance running on mysql-5.7.19. However, I found that its physical memory and virtual memory are both growing slowly. Finally, the mysqld process was killed by Oom-killer.

Ok , 说人话。

因为历史原因,我将网络组zabbix使用的mysql数据库升级到5.7.19

近期来常出现数据库重启现象。通过查看日志发现,出现了OOM。


同时对mysql的监控也证明了确有内存使用不断增加,进程被kill后内存释放。
mysqld的守护进程mysqld_safe重新拉起mysqld进程后,周而复始。
系统内存使用图如下


而后,我在mysql官网的buglist中模糊查找关于memery leak的bug。
5.7.22,23的几个案例
https://bugs.mysql.com/bug.php?id=91861
https://bugs.mysql.com/bug.php?id=91710
https://bugs.mysql.com/bug.php?id=92112
虽然没有确凿证据是哪里的func引起内存泄露。但是的确发生了。

我们之前线上也出现过5.7.18-19有类似重启现象。后将版本升级到5.7.21,暂时没有此类现象。。

结论:

1、不建议使用5.7.17-19 因为出现过。。5.7.22-23,别人也发生过。。

2、内存使用过高有告警,此外也要关注内存使用趋势。防范于未然。

                                                                                                                                                                                                                                ————   dba_yix  180827

原文地址:https://www.cnblogs.com/xiangerfer/p/9540811.html