This is a discussion on How to set a HARD memory limit for apache within the Apache Web Server forums, part of the Web Server and Related Forums category; I have a Linux server that I am configuring for Apache to me used with mod_perl. I want to make ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have a Linux server that I am configuring for Apache to me used with
mod_perl. 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 CleanupHandler. So, does anyone have any suggestions for what I should use. Thanks. i |
|
|||
|
Ignoramus12509 <ignoramus12509@NOSPAM.12509.invalid> writes:
> 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. How about just putting a hard ulimit in the apache init.d script? > 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 > CleanupHandler. Dunno about that. -- Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/ |
|
|||
|
Ignoramus12509 <ignoramus12509@NOSPAM.12509.invalid> wrote:
> I have a Linux server that I am configuring for Apache to me used with > mod_perl. > > I want to make sure that no apache child can, ever, under any > circumstances, exceed some memory size limit such as 300 MB. > .... > I want behaviour such as > that specified by bash ulimit function. Instant death immediately upon > reaching the limit. I don't understand the problem. If ulimit does exactly what you want, why not just use ulimit? Xho -- -------------------- 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 this fact. |
|
|||
|
Ignoramus12509 <ignoramus12509@NOSPAM.12509.invalid> wrote:
>I have a Linux server that I am configuring for Apache to me used with >mod_perl. > >I want to make sure that no apache child can, ever, under any >circumstances, exceed some memory size limit such as 300 MB. I fail to see the relationship between your question and the programming language uses. [...] >So, does anyone have any suggestions for what I should use. I would suggest to use a newsgroup that deals with Apache and/or your OS of choice. jue |
|
|||
|
Ignoramus12509 wrote:
> I have a Linux server that I am configuring for Apache to me used with > mod_perl. > > 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 > CleanupHandler. > > So, does anyone have any suggestions for what I should use. > > Thanks. > > i Apache source, and a C compiler, and a custrome version of malloc(); |