Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Unexplained Zombies

by Gorby (Monk)
on Feb 26, 2003 at 18:39 UTC ( [id://238870]=perlquestion: print w/replies, xml ) Need Help??

Gorby has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, My server administrator tells me that there are several "zombies" of one script occupying my server resources. This script is quite short, runs as expected and exits as expected whenever it is executed once at a time. However, when 10 or more people access the script in the same second (as in the peak hours of our service), zombies appear. No forking or anything like that is used in the script. What could be creating those zombies and what can I do to prevent them from occuring? After a while, the zombies do disappear but it takes more than 24 hours. Thanks a lot wise monks.

Replies are listed 'Best First'.
Re: Unexplained Zombies
by Zaxo (Archbishop) on Feb 26, 2003 at 18:47 UTC

    I think your program has bit-rotted to the point that it is dripping small body parts as it shambles about.

    If that seems unlikely, please show your code.

    After Compline,
    Zaxo

Re: Unexplained Zombies
by chromatic (Archbishop) on Feb 26, 2003 at 18:49 UTC

    Without seeing code, it's hard to say. The traditional way of avoiding zombies is to bury the dead under layers of concrete. In Unix-land, the parent process has to wait on its children. My guess is that whatever's launching your program isn't waiting for all of the instances to exit.

      Isn't there something about waving a dead chicken over your keyboard, as another way to avoid zombies? Or am I just thinking of something completely different? ;)
Re: Unexplained Zombies
by boo_radley (Parson) on Feb 26, 2003 at 20:27 UTC
    It's a trick. Get an axe.
Re: Unexplained Zombies
by bluto (Curate) on Feb 26, 2003 at 19:26 UTC
    Ask your admin what he/she means by "zombie". As mentioned previously, the usual meaning is that a forked child process has died but has not been reaped (with wait or waitpid). They may also mean your script is not exiting in some cases.

    A 'ps' listing will show the difference (i.e. most ps's will show 'defunct' as part of a zombie's name or flag the output in some other way).

Re: Unexplained Zombies
by LostS (Friar) on Feb 26, 2003 at 21:12 UTC
    Well as not being an expert Monster vaquisher... I do know quiet a bit about monsters due to all the so called "scary" movies I have watched. In "Return of the Living Dead" series the way to kill Zombies was to well cut off their heads. Cause all they try and do is eat brains... so... get a sword or an axe or something you can swing and start choping heads off...

    No if you talking about false programs running... Post the code :) Or maybe add an alarm(60); or something so it dies no matter what in 60 seconds...

    -----------------------
    Billy S.
    Slinar Hardtail - Hand of Dane
    Datal Ephialtes - Guildless
    RallosZek.Net Admin/WebMaster

    perl -le '$cat = "cat"; if ($cat =~ /\143\x61\x74/) { print "Its a cat +!\n"; } else { print "Thats a dog\n"; }'
Re: Unexplained Zombies
by bart (Canon) on Feb 26, 2003 at 21:15 UTC
    No forking? No system or anything like that? Then it's not really your own problem. The server seems to be messing up.

    How long does that script take to run?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://238870]
Approved by diotalevi
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-25 21:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found