Dear monks,

I'm sorry for my awful English, hope you'll forgive me.

I wrote a program using Net::Server::Prefork module that works fine but shows a strange quirk: I understand that whenever the server spawns more than max_spare_servers process, if I stop sending requests it should kill the exceeding processes.

Instead, this is what I find in syslog>

May 10 23:24:04 localhost tme[7967]: Processing diff (0), Waiting diff + (-2) May 10 23:24:04 localhost tme[7967]: Killing "2" children May 10 23:24:04 localhost tme[7967]: Starting "1" children May 10 23:24:04 localhost tme[8470]: Child Preforked (8470) May 10 23:24:04 localhost tme[7967]: Starting "1" children May 10 23:24:04 localhost tme[8471]: Child Preforked (8471) May 10 23:24:44 localhost tme[7967]: Processing diff (0), Waiting diff + (-2) May 10 23:24:44 localhost tme[7967]: Killing "2" children May 10 23:24:44 localhost tme[7967]: Starting "1" children May 10 23:24:44 localhost tme[8483]: Child Preforked (8483) May 10 23:24:44 localhost tme[7967]: Starting "1" children May 10 23:24:44 localhost tme[8484]: Child Preforked (8484)

And this go on indefinitely: every 40 seconds the server kills two children (but it was only one over the max_spare_servers quota) and then immediately respawns them!

I tried google, I read the (not so complete) documentation of the module and I even tried to browse the sources of the module but I found nothing.

Does anybody know if this is a known bug of the Net::Server or if there is a known condition in which this behavior is t be expected?

Thanks in advance


In reply to net::server::prefork fork too much by psini

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.