0

I'm using a VPS on Ubuntu 10.10 to serve my private website and Apache 2.2.16 keeps crashing without a trace. The server is on a very light load with about 300 visits/day.

To solve this I have set up monit to regularly check on apache the but that keeps crashing too.

I have checked my resource consumption and I'm well below the critical level:

control panel view of resources

I have checked /etc/apache2/errors.log and /var/log/syslog but couldn't find a trace of an error. I'm pretty much at the end of my wit.

How can I debug this issue? I'm using a pretty cheap VPS. Could they be the reason for the flakyness?

Aliaksandr Belik
  • 259
  • 6
  • 17
Leonard Ehrenfried
  • 371
  • 1
  • 3
  • 8

1 Answers1

2

You're using a Virtuozzo instance, which isn't really a VPS but a container, basically a kernel enforced chroot. From what I've seen from my dealing with it, its OOM manager is very dodgy. Because of the way it works, another container on the same hardware node could be hogging memory, but because your processes started after the processes causing the issue, your processes get killed.

Unfortunately you can only see what the OOM is upto on the host server, so you'll have to check this with your provider. Most likely they've oversold the memory on the server you're on a bit more than they should.

To quote the Linux Memory Manager page:

So the ideal candidate for liquidation is a recently started, non privileged process which together with its children uses lots of memory, has been nice'd, and does no raw I/O. Something like a nohup'd parallel kernel build (which is not a bad choice since all results are saved to disk and very little work is lost when a 'make' is terminated).

My theory is that Virtuozzo hasn't touched the OOM manager in the host kernel to make it aware that there's virtualised processes running, so it doesn't realise it's killing privileged processes in your "VPS". However, that's just conjecture as I haven't been able to check it with Parallels, who're the people responsible for Virtuozzo.

Niall Donegan
  • 3,859
  • 19
  • 17
  • Have to agree here. Containers are a new space and IMO, nobody has gotten it 100% right. I'd complain *LOUDLY* to your VPS provider. – SpamapS Mar 15 '11 at 04:37
  • Thanks for this answer. I have gotten around to thinking that it is the host OS that is killing the process and have begun moving to EC2. – Leonard Ehrenfried Mar 16 '11 at 06:44