  Using ulimit to limit resource usage by Apache   We're running
a web server, hosting several hundred virtualhosts, most of
whom use PHP.  Since there is so much use of PHP, I've compiled
it into  Apache, rather than as a loadable module.    Rather
frequently, it seems that a httpd process (we've tracked it
happening) will go rogue and consume all memory on the server (1
gig RAM, 2  gigs swap) which brings the server to its knees and
make it utterly  unresponsive.  Since it's co-located, it's an
utter pain to have to go in and  manually reboot the machine.
In /etc/profile, I added "ulimit -v 250000", intending that any
process  should have no more than a rather generous 250 MB of
memory available to it,  intending the prevention of a rogue
httpd process from devouring all the  resources.   But it seems
that the machine was knocked over again this  evening, shortly
after a reboot (remotely) to test httpd.    I was wondering if
putting the "ulimit -v" command in /etc/profile was  appropriate
for a daemon