I am facing this problem for sometime now. My ram gets all used and the sites on server stop responding and everything comes back to normal once I reboot it from Hypervm. So basically I have to reboot the server every once in a few days. I continuously keep checking my adsense impressions and when they start getting low I know there is a server problem and try logging in my HyperVM and find the ram always used(mostly 100%) and then I reboot it and all goes back to normal. I am looking for a solution to this and I have no idea what is going wrong.
You can set a cronjob as 'root' to reboot your VPS, however, it is not recommended to reboot the vps from within itself as it will end up in the 'mounted' state and you will have to ask your host to reboot it for you. See if there is any option in HyperVM using which you can schedule the reboot so that the VPS will come online immediately. Make sure the required services are turned ON in chkconfig so the services will start automatically after the reboot. BTW, did you notice the high resource usage after you enabled adsence OR is it an old issue? You should have someone look into your server to see what exactly is using up the resources.
Have to agree - you really need to find the problem with the server rather than going for a work around - re-booting the server should be the last resort.
Completely agree with this. By rebooting all you're doing is painting over the cracks while the building is falling down. You need to find out why memory is being used and not released, and fix that.
Does it happen for long periods of time or just for a few minutes/hours? It might be just maintenance scripts running (ie. logrotate, logwatch, etc...). Things usually go back to normal once they are done.
How much memory is going to cache? Try issuing this command: sync; echo 3 > /proc/sys/vm/drop_caches and advise if your memory frees up.
agree you have to find the cause of memory usages, instead of doing work around, if you put a cron to reboot, it may not come back online and get stuck in file mount stage, in that case it has to be rebooted manually, and if you are not monitoring your server, than it might be down for long period in that case