[asterisk-users] Run-away Asterisk
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Feb 28 13:28:32 MST 2007
On Wed, Feb 28, 2007 at 10:56:14AM -0800, Yuan LIU wrote:
> After testing some AGI's, I noticed several extra Asterisk processes.
An agi script is run by the same user running asterisk, but is not
"asterisk": it is a different program. What is the command name on those
scripts?
> They
> are not zombies, but can't be killed by safe_asterisk.
safe_asterisk attempts (poorly) to guard asterisk. Not really to guard
all of its child processes.
> Nor will they die
> when CLI issues stop now. Then I read that each AGI spawns a separate
> Asterisk process.
Huh? AGI? FastAGI?
> But all my AGI calls have apparently completed
> successfully. So there should be no reason for them to hang there.
>
> Several questions:
>
> 1) Under what conditions will an AGI hang a process? (My test scripts are
> pretty simple, almost directly derived from agi-test.agi.)
An AGI may be an arbitrary subprocess. This subprocess can do basically
everything. If it really wants to, (or if it misbehaves in the "right"
way) it won't die.
>
> 2) How to detect run-away processes under 2.4 kernels? In this kernel,
> each thread clusters process space and it's very difficult to distinguish
> them without killing the main process.
hmm, please attach the output of:
ps auxww | grep asterisk
>
> 3) Any practical way to detect them from inside Asterisk - e.g., do some
> check after each AGI call? All my AGISTATUS reports success. I could use
> System() but isn't that cumbersome?
Write/use better code, I guess.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir at jabber.org
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-users
mailing list