Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

"Defunct" FastCGI processes (mod_fastcgi) after apachectl stop

by sundialsvc4 (Abbot)
on Jun 16, 2011 at 13:57 UTC ( #909957=perlquestion: print w/replies, xml ) Need Help??
sundialsvc4 has asked for the wisdom of the Perl Monks concerning the following question:

I’m running some processes as Apache static-servers under mod_fastcgi (latest version), and I notice that, when I do apachectl stop, I am left with processes that are defunct.

Specifically, I am using Plack::Handler::FCGI with nprocs = 10, and upon termination of Apache it is the parent processes (and therefore, all of their children also) that are defunct.   (The parent-pid of the dead fish is now 1.   i.e. init)

It is not immediately obvious to me why this would be so.   Any suggestions?

  • Comment on "Defunct" FastCGI processes (mod_fastcgi) after apachectl stop

Replies are listed 'Best First'.
Re: "Defunct" FastCGI processes (mod_fastcgi) after apachectl stop
by flexvault (Monsignor) on Jun 17, 2011 at 15:55 UTC

    I've seen this problem, but not your specific case. If you kill -9 a process, the process is killed without getting control again. So the process can't reap its zombies. Some operating systems will clean up, and others won't.

    apachectl is a shell script that calls "httpd" with different parms. So if your "man httpd", and you could then try various ways to shut the apache server down using "httpd ...". If you find what you want, then either update apachectl or generate a script to do it correctly.

    Good Luck

    "Well done is better than well said." - Benjamin Franklin

Re: "Defunct" FastCGI processes (mod_fastcgi) after apachectl stop
by sundialsvc4 (Abbot) on Oct 01, 2011 at 12:12 UTC

    Well, I am still seeing zombies.   (And, were it not for their annoying propensity for playing the Thriller video at top volume all day and all night, I probably wouldn’t mind.   But the computer center operators are beginning to complain, and, well, I’ve always been a little suspicious of nighttime sysops, anyway...)

    When I drop in to visit now and then, I see one or more zombie process-trees.   (These consist of the now-zombie processes started as CgiStaticServers, and their also-zombie children.)   Meanwhile, another process-tree is running merrily away.   (The site is up, but there are just these dead bodies everywhere, playing Michael Jackson videos.)   I can always get rid of them by kill -9 on the parent-zombies, but why isn’t Apache/mod_fastcgi cleaning them up?

      but why isnít Apache/mod_fastcgi cleaning them up?

      Shot in the dark, but mabye $SIG{PIPE}= $SIG{CHLD}= 'IGNORE';??

      I hope you post this in the bug cue

Re: "Defunct" FastCGI processes (mod_fastcgi) after apachectl stop
by Anonymous Monk on Feb 11, 2013 at 03:41 UTC
    any updates on this?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://909957]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-06-23 05:24 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.