Random Crash

Has anyone got any pointers in tracking down a VPS that will crash every couple of days?

I have Virtualmin on a VPS with 768 ram and another 800mb of virtual memory. Still after a day or so I lose apache, mysql and SSH to name a few. It still responds to PING requests.

My guess is an out of memory problem but reading through the logs is like trying to figure out calculus problems. What should I look for? How can I get a better handle on what the server is doing when it is down? Can I setup some sort of low mem alert to send me an alert to warn me or trigger an auto reboot?

I’m desperate, any suggestions will help!

After looking into it, I see that something causes Apache to trigger a ton of threads eventually consuming physical and vram. The machine then seems to choke and go unresponsive.

I guess my next step is to find out wgat could be causing this death spiral.