Hello,
I've been enjoying the performance benefits of mod_perl, and appreciate the help of the contributors here.
Now I'm investigating why our production code is producing zombies. I'll
post the key parts of my code below. First, some observations:
1. Zombies appear to be created only in a minority of the times the fork
is made.
2. Restarting Apache seems to kill the zombies. I was under the
impression that with a "true" zombie, an OS restart was required
to kill zombies.
Here's my code structure. It comes from a CGI::Application-based project using Apache::Registry.
$SIG{CHLD} = 'IGNORE'; defined ($childpid = fork) or return $self->error( title => 'Technical Failure. ', msg => 'The search could not be completed due to a technical failure. ', );
unless ($childpid) { open STDIN, "</dev/null"; open STDOUT, ">/dev/null";
# break out a new DBI connection for use by the child my $DBH = $self->connect_db(undef, { dbi_connect_method => 'connect' }); $self->param('dbh', $DBH);
eval { &my_long_running_operation; }; carp $@ if $@;
CORE::exit(0); }
May be it's just not working on your platform. Have you tried the other suggested solutions at:
http://perl.apache.org/docs/1.0/guide/performance.html#Avoiding_Zombie_Processes
Also did you try to strace the hanging processes, to see what are they hanging on? (i don't remember if one can strace a zombie).
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html