Hi Guys,
I’m still quite new to Asterisk and to Linux for that matter. I had a friend take a look at my system and he found a lot of Zombie Processes. He said that it’s not a big deal with regards to memory usage but that once I reach 32,767 or so Zombie processes, the system could crash.
In fact, every 4 - 5 days, Asterisk just “exits” to the Linux command line for no apparent reason. When I re-launch safe_asterisk everything is fine.
The Zombie processes appear on Every call when the Caller Hangs Up. When I hangup on the caller they do not appear.
Here is an example of some of the Zombie Processes:
ps aux
root 11968 0.0 0.1 8152 6708 ? S 14:55 0:00 /usr/bin/python /var/lib/asterisk/agi-bin/LIVE.agi
root 11970 0.0 0.0 0 0 ? Z 14:55 0:00 [LIVE.agi]
root 11973 0.0 0.1 8152 6720 ? S 14:56 0:00 /usr/bin/python /var/lib/asterisk/agi-bin/LIVE.agi
root 11976 0.0 0.0 0 0 ? Z 14:57 0:00 [LIVE.agi]
root 11978 0.0 0.0 0 0 ? Z 14:57 0:00 [LIVE.agi]
root 11980 0.0 0.0 0 0 ? Z 14:58 0:00 [LIVE.agi]
root 11982 0.0 0.0 0 0 ? Z 14:58 0:00 [AGENTS.ag]
root 11984 0.0 0.0 0 0 ? Z 14:59 0:00 [AGENTS.ag]
root 11986 0.0 0.1 8160 6688 ? S 14:59 0:00 /usr/bin/python /var/lib/asterisk/agi-bin/LIVE.agi
root 11988 0.0 0.0 0 0 ? Z 14:59 0:00 [LIVE.agi]
root 11990 0.0 0.0 0 0 ? Z 14:59 0:00 [AGENTS.ag]
root 11994 0.0 0.0 0 0 ? Z 15:00 0:00 [LIVE.agi]
root 11996 0.0 0.1 7096 5560 ? S 15:01 0:00 /usr/bin/python /var/lib/asterisk/agi-bin/AGENTS.agi
root 11998 0.0 0.0 3988 1676 pts/0 S 15:02 0:00 /bin/bash
root 11999 0.0 0.0 3428 988 pts/0 R+ 15:02 0:00 ps aux
When I “hang-up” on a caller (it does not create a Zombie) and when a caller hangs up (It does) I call the same DOHANGUP procedure:
def dohangup(): # This is a Python Script
astercon (“HANGUP WAS A SUCCESS”)
astercon(" ")
sys.exit()
Any ideas on how to prevent the Zombie Processes?
Will the system hang when I get tons of these or is there another problem that “shuts down” Asterisk ?
Thanks,
Dave