Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.3.17
-
None
-
CentOS 7 (3.10.0-1062.1.1.el7.x86_64)
Description
Hi guys,
we experience a serious problem since we upgraded from MariaDB 10.1.25 to MariaDB 10.3.17 about two weeks ago.
The memory consumption of our master server slowly increases over time for no obvious reason and then the service gets killed by the oom-killer. This timespan is only about one day! Like for example today at 9:00 AM, the memory consumption of mysqld was 1,952 MB, while about two hours later (at 11:13 AM), it hit 3,484 MB (that's about 60% of available RAM). Even though the innodb_buffer_pool_size is limited to 1 GB.
To prevent the master from getting killed by oom-killer, I manually restart the MariaDB service every evening.
What's weird about this is, that before the upgrade the cluster consisting of one master and one slave worked like a charm. Even though we have a cluster controlled by MaxScale, which performs automatic failover if the master gets killed, this is not very pleasing if it happens regularily while people are working.
Does anybody have an idea where this could suddenly come from or how to find out what's going on? Is the database corrupt?
If you need more information or details, I will provide you with as much info as I can.
I really hope that you guys can help me, as I absolutely ran out of ideas.
Thank you in advance!
Regards,
matze
Attachments
Issue Links
- relates to
-
MDEV-19287 Memory leak issue in systemD on mariaDB cluster with remote ssh
-
- Closed
-
matze HI. If you have a simple memory leaks from malloc() or indirect calls to malloc() by libcurl or something similar, than you can easily catch those without recompiling MariaDB or your plugins using TCMalloc by Google. You can plug it in through LD_PRELOAD and use as described here http://goog-perftools.sourceforge.net/doc/heap_checker.html
I general, I doubt that such ubiquitous libraries like glibc or libcurl have any memory leaks.
MariaDB doesn't have any 'simple' memory leaks which can be detected by automatic tools. Different memory arenas exists in MariaDB. F.ex, triggers, stored procedures and prepared statements are stored in such arenas. And there is no simple way to detect leaks in such arenas. And I think you may have such a leak. To find this you need to run MariaDB for sufficient time and gain statistic on memory allocations from different function calls. Again, TCMalloc can collect such statistics. I think --inuse_space from https://gperftools.github.io/gperftools/heapprofile.html best suites our needs.
I have no idea for how long you need to collect memory statistics to get enough of it. You may checks TCMalloc output by yourself until you find something suspicious.