Most likely your database cache is simply set too large.
I've been experiencing similar issues with MySQL (please read in detail):
https://stackoverflow.com/questions/43259136/mysqld-out-of-memory-with-plenty-of-memory/43259820
It finally went away after I've been lowering MySQL cache by a few
Hi all,
We are trying to convert our libvirt-lxc containers to LXC containers on CentOS
7 due to race conditions that are causing a lot of instability during our
testing of the former. I am currently testing against LXC 1.0.9 because it was
easily available to me in the EPEL repo, but I hope
I have a lot of memory management issues using pure LXC. In my case, my box
has only one container. I use LXC to be able to move my app around, not to
squeeze performance out of hardware. What happens is my database gets
killed the OOM manager, although there are gigabytes of RAM used for cache.