Hi Monks,
I am using P:FM to perform some large database query and update process. I have observed that my parent process is dying before all the child processes are finished. For example, if I create 10 child processes, it is usually the case that parent process automatically dies after 8 child processes are finished but 2 are still active (got the stat from 'ps' ... ). what might be the reason of early termination of parents? I have used the standard P:FM format:
my $pm=new Parallel::ForkManager($tc-1);
for (my $c=1;$c<$tc;$c++){
$pm->start and next;
my $child_dbh = $dbh->clone();
$dbh->{InactiveDestroy} = 1;
....
$child_dbh->disconnect or die("Couldn't disconnect");
$pm->finish;
}
$pm->wait_all_children;
----
Any ideas?
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.