We have a VPS server (it's using Virtuozzo). On a few occasions now, our VPS memory was fully used up and no new connections could be made to the server on SSH, SMTP, or POP. The only thing that works is connecting to the web service. Luckily, plesk is running on the VPS and we have been able to reboot it through plesk (as well as see that the RAM is 100% used).

I would like to find what process is causing this. I have a feeling it's MySQL, but don't really know. Is there some sort of logging I could implement that would help me find out what was the cause of this next time it happens?


  • This doesn't smell like a memory leak to me (though I could be wrong) - Does Virtuozzo have a "system console" access? If so, can you get in to the system through that & try to troubleshoot from there? – voretaq7 Feb 9 '10 at 3:58

In situations such as yours I have run ps aux from cron every minute so I could look back and find the memory hog. Put the following in your crontab:

* * * * * (date ; ps aux) >> $HOME/ps-aux

Caution: this may build a large log file over time.

After your next crash, you can look back through the file looking for processes that use a lot of memory (the "%MEM", "VSZ", and "RSS" columns would be where to look).

| improve this answer | |
  • Thanks. I was hoping to avoid something like that. I guess there might not be another option. – mhost Feb 9 '10 at 23:50

Have you tried anything like atop?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.