Hello,
Two months ago I set up a new PBX system running as a Hyper-V guest. It has 4096 MB RAM allocated (dynamic memory is not enabled) and the traffic is usually quite low.
There is something wrong with the memory consumption, because one week after restart it shows nearly 100% usage and Asterisk becomes unstable.
Used memory: 96.45% Free memory: 3.55% Used buffers and cache: 95.48% Free buffers and cache: 4.52% <= available memory Used swap space: 18.66% Free swap space: 81.34%
yes, this is the latest FreePBX version available, I have also installed Linux Integration Services Version 4.0 for Hyper-V but with no change to my problem
I will also try your workaround, but how to find out a memory leak cause in the asterisk process? Is FreePBX or pure Asterisk not compatible with Hyper-V?
This only drops the file cache, so doing this doesn’t actually help with applications that consume all the memory. The linux kernel will use filesystem cache then swap before going OOM.
I have very similar issues with Freepbx 13 & 14. I have tried them on physical boxes and virtual. No matter what install I do they only constant is that memory fills up. My Asterisk process doesn’t quit but the Swap files start getting very high and I then start getting audio issues.
I have tried with different amounts of ram ranging from 1gb-4gb.
Not a dev but from what I have seen of the past year + is that there is a mem leak somewhere. I use crontab and reboot my voice server once a week at 2am to deal with the issue.
I was working on it for more than 6 months, this is not a memory cache issue and you CANNOT fix it by “sync; echo 3 > /proc/sys/vm/drop_caches”. It’s only the kernel issue that fixed in kernel 4.x lt. So you can use this instruction for upgrade your kernel: https://www.tecmint.com/install-upgrade-kernel-version-in-centos-7/
I hope it will be helpful everyone has this issue.