On Mon, Apr 04, 2011 at 10:04:21AM +0100, Adam Sweet wrote:
On 30/03/11 21:08, Alberto Bertogli wrote:
On Mon, Mar 28, 2011 at 11:10:59AM +0000, Andy
Smith wrote:
If it's always apache2 then it could actually
be apache using all
the memory and going into swap, then being too slow to do anything.
It might be something else though. Or it might not be memory-related
at all.
If it keeps happening maybe you could put Apache in a memory cgroup,
that way if it begins to use too much memory it'll be contained and the
VPS will be fully usable. It will also prevent the OOM killer touch
processes not in that cgroup, and give you a decent environment to debug
the issue.
We've been doing that in our VPS for about a week and it's been working
great for us.
That's a nice idea, I'd not heard of that before, I'm going to look into
that.
For some closure, I should say that I've not had a crash in the week
since my original post, having driven the Apache MaxClients down to 10,
which is kind of annoying :-/
It seems incredible that you can't serve more than 10 simultaneous
clients on ~500MB RAM so perhaps it is time to consider an alternative
HTTP server.
It's possible that you may be able to put a proxy in front of your heavy
backend Apache, split the processing up a little so dirs that require
more dynamic work get off loaded to a heavyweight Apache, with lower
concurrent "listeners", whilst your static content gets handled by the
lighter Apache, which has more "listeners".
By the way, LugRadio was perhaps one of the best things to ever happen
in the UK. You provided many, many hours of entertainment to me. Huge
respect.
--
Best regards,
Ed
http://www.s5h.net/