Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How to set a HARD memory limit for apache
February 29, 2008, 2:30 pm
rate this thread
I want to make sure that no apache child can, ever, under any
circumstances, exceed some memory size limit such as 300 MB.
I looked at perl modules such as Apache2::Resource and
Apache2::SizeLimit and they would not work for me. The former just
does not do its job, and the second a) just checks memory size and b)
does not work with threaded MPM.
What I want is a very simple thing: I want an apache daemon to
INSTANTLY DIE if it ever reaches size of X such as X = 300 MB. I do
not want to "give them a chance". I also do not want to "check the
size at some times (like in CleanupHandler)". I want behaviour such as
that specified by bash ulimit function. Instant death immediately upon
reaching the limit.
The reason for this is that I do not want a memory consuming bug in my
mod_perl code to damage my server.
At the same time, I would like to set a lower limit that would exit
apache gracefully and that would be checked from, say, a
So, does anyone have any suggestions for what I should use.
- Joost Diepenmaat
February 29, 2008, 3:15 pm
Re: How to set a HARD memory limit for apache
I don't understand the problem. If ulimit does exactly what you want,
why not just use ulimit?
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate