in reply to Re: Parallel ForkManager problem: parent dies early before all the child finishes
in thread Parallel ForkManager problem: parent dies early before all the child finishes

Basically the perl cgi is called upon from an html form and it does some expensive database operations based on batch file input. The program is working fine with relatively smaller input (say 10000 input sequence). The children are doing their bit of work properly and upon termination the main process starts again and do the final bit of calculation. Problem happens for larger batch files. I tested with 50000 input sequences and found out that all the children are created properly and finish their job accordingly. but during their run, parent dies abruptly. The result is the html page that is waiting for the result from the cgi is waiting forever, because the original process is no longer active. Not getting any error message, the main process simply dies while some children are still active. I didnt use any signal handler in the parent. For the larger bach processing, the main cgi does not reach the line after wait_all_children, but for the smaller batch processing, it indeed does and finishes the job.
  • Comment on Re^2: Parallel ForkManager problem: parent dies early before all the child finishes
  • Download Code

Replies are listed 'Best First'.
Re^3: Parallel ForkManager problem: parent dies early before all the child finishes
by zentara (Cardinal) on Aug 19, 2011 at 14:22 UTC
      I was running the normal(serial) version of the program and it runs for 1 hour or so without any problem. I was trying to use parallel version to make the whole thing faster, but for some reason, parent process cant live for even 3/4 minutes.
Re^3: Parallel ForkManager problem: parent dies early before all the child finishes
by ikegami (Patriarch) on Aug 22, 2011 at 22:17 UTC
    You missed the most important one. What exit code do you get?