I have a VPS with 512Mb RAM, 20Gb space and 100Mbps bandwidth. I'm rather new at configuring servers.. I'm using this VPS to host some websites of mine. It's running Ubuntu Server 12.04.

Every TOT hours my server becomes inusable and I need to restart it in order to take control again. I saw these errors when I restarted it:

enter image description here

I have apache2, php5, mysql, phpmyadmin, exim4 installed.. Could it be a RAM problem? RAM went out of memory? If I had more RAM would I solve the problem?

Here are some graphs I can see from the panel:

enter image description here

Can you help me?


Whether or not the CPU is stressed has nothing to do with whether or not you're experiencing a RAM problem (which you are).

While purchasing more RAM will likely be a temporary solution to the problem, the real solution requires a bit more work.

In short, you need to re-configure apache and MySQL. Most distros ship apache and MySQL in configurations that assume you'll be running them on systems with lots of RAM. They will need to be tweaked to take into consideration the small amount of RAM available to them on your VPS.

In apache, look at your MPM settings, and make sure that you have an upper bound set on the number of apache processes that will start up. For MySQL, disable any functionality you don't need (InnoDB, for instance), and adjust cache/buffer settings.

There are multiple articles here on SF on the subject if you need more detail.

| improve this answer | |
  • Thanks for your reply! :) Can you be more specific on where do I modify MPM settings and how..? – MultiformeIngegno Jun 6 '12 at 13:38
  • This will give you a good start. It goes without saying, though, that any configuration you find only will need to be modified for your specific needs. – EEAA Jun 6 '12 at 13:41

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.