I am having an issue where the RAM on the virtualised machine is becoming exhausted after periods of time, the machine itself has 4GB RAM assigned to it and it always seems to be reporting around 15% usage but for some reason it keeps crashing PHP and the machine just stops responding. The only thing I can do is restart the hyper-v instance.
- Windows 2008 Hyper-V
- Host machine has 8GB RAM
- Client machine has 4GB RAM
- CentOS 6.4
- Approx 10 websites hosted on the VM, 2 of them medium / high traffic, the rest low
We have cPanel installed which sends this email at the time of the error,
Used: 3616MB Available: 123MB Installed: 3727MB
368.82 384.07 328.93
We set this up as a favour to the client really, we normally only deal with Windows boxes but they needed to be able to host Wordpress (which I believe runs better on Linux) and some .net web services. Hence why Windows and CentOS.
When opening the Hyper-V console for the instance, the error is "Out of memory". I know this sounds obvious but I really cannot believe that a few sites are consuming 4GB of RAM and especially when the average running percentage is at 15%.
I have installed New Relic now as a server monitor and that is reporting averages of 15% RAM usage. Below are the results of top and free -m though which look a little different.
- Total - 3817280k
- Used - 2874372k
- Free - 982808k
- Buffers - 257284k
- Total - 3727
- Used - 2697
- Shared - 0
- Buffers - 251
- Cached - 2037
Does anyone have any idea what the underlying problem would be? I could just assign a couple more GB RAM to the client but I don't know if that is going to solve the problem for good or just delay it?