Hello again dear monks,
Screaming for help twice in a day, what can I say, I hate Mondays...
So here's the thing. I created a server which receives messages and creates child processes to handle these messages. Everything went fine till today, when I made a simple test, sending the same message 100 times. Well, my server creates exactly 64 child processes and then starts returning undef (as far as I know, ths means that fork() has failed). I konw that there are some limits concerning the number of pseudo-processes running at the same time, because they really make part of the same process and stuff. The thing is I don't need these 100 processes to run concurently. That's why i am exiting the child process (with
exit 0) when its job is finished. So I don't have 64 processes running in parallel, I have only 2 or 3, depending on the time of exit. But even if I serialize the process and wait for the child to exit before creating a new child, I get this 64. For what I see, even after
exit, the child is still counted as alive. That's why I want to vizualize all the pseudo-processes running at a given time. As 64 is not 42, I suppose there has to be a logical explanation for this and I beg you to save my stormy Monday.
Thanks.
PS: Sorry I didn't put any code in but the application contains several packages and it is really difficult to assemble it as a simple example.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.