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.
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
| [reply] |
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.
| [reply] |
|
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? ;)
| [reply] |
Re: Unexplained Zombies
by boo_radley (Parson) on Feb 26, 2003 at 20:27 UTC
|
It's a trick. Get an axe. | [reply] |
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).
| [reply] |
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"; }'
| [reply] [d/l] |
Re: Unexplained Zombies
by bart (Canon) on Feb 26, 2003 at 21:15 UTC
|
| [reply] |
|