As one of the people who has maintained Apache::SizeLimit over the years, I can tell you that BSD support has always been dependent on patches from BSD users. Periodically, someone would come along and say that there was something incorrect about it, and offer a suggestion or patch, like the one that Phil Gollucci put in to the most recent release. If you think you have a solution, the mod_perl devs would be glad to accept a patch.

Linux support has been pretty solid, but we had an issue a couple of years back when we discovered our attempts to tell how much of the process was being shared by copy-on-write did not work. We discovered that Linux was not making that information available and the differences we saw were accounted for by other things. (That, by the way, is what the docs are talking about when they refer to shared and unshared memory.) A recent change on the Linux side allowed us to correct this, with some cost to performance.

It's definitely tricky to get the right settings. If you tune it so that apache won't start swapping under heavy load, that can lead to perverse behavior under light loads, when processes exit without needing to. My usual approach is to tune MaxClients lower and let the processes get bigger. I figure I'm trading some concurrency for improved speed in the lower number of children (because they won't be spawning new procs all the time).

Your idea of using an external watchdog should work. Send a SIGUSR2 and make a perl handler for it that calls $r->child_terminate.


In reply to Re: Memory, Apache::SizeLimit, BSD::Resource::getrusage(), and the long road by perrin
in thread Memory, Apache::SizeLimit, BSD::Resource::getrusage(), and the long road by tye

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.