[asterisk-users] Asterisk server crashes after two years

Nir Simionovich nirs at exchange.atelis.net
Sat Sep 2 13:31:27 MST 2006


Hi Tzafrir,

  Actually, it would appear as something is wrong with the PHP script 
Michael is referring to. As far as I understand AGI, for each AGI script
that has to be run, asterisk will fork it self out, run the AGI within
the fork, then return back to asterisk once the AGI is complete. 

  Now, I've written quite a few AGI scripts, some really bad and some 
really good - so I can surely say the following: If you have 1000 asterisk
threads running and you can see your AGI script running 1000 times, then
something in your AGI it surely wrong. 

  Just as an example, I've once built an AGI that was supposed to handle 
some garbage collection at the end of a call. I never assumed that my 
system would may end up running to around 3000 concurrent calls (10 servers),
then that script would hang on all machines waiting for the database. 

  In other words, I would highly suspect the AGI script at this point as
being a little faulty, and I would sure go and examine it freshly. Although,
I wouldn't go and debounce your 2.4 theory, as that one holds water too.

Nir S

----- Original Message -----
From: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
To: asterisk-users at lists.digium.com
Sent: Saturday, September 2, 2006 2:36:23 PM GMT+0200
Subject: Re: [asterisk-users] Asterisk server crashes after two years

On Thu, Aug 31, 2006 at 09:40:50PM -0600, Michael Welter wrote:
> My Asterisk colo server has been up for almost two years.  Today it 
> crashed.  When I gave the reboot command, it crashed so hard that it had 
> to be power cycled.  I wasn't in attendance, but I can speculate that it 
> had a kernel panic during the shutdown.
> 
> Yesterday I added a PHP agi script, and it had been user over 1000 times 
> before the crash.  I don't think the Linux/Asterisk crash is coincidental.
> 
> Can someone give me things to look for?  I'm watching memory, and it has 
> 750MB free (out of 1GB).  When I restart Asterisk, I see 19 
> processes--is this normal?  

Is this kernel 2.4? If so: do they happen to have exactly the same
memory size and the same files open? If so: this is normal: threads of
the same process.

> What else should I be doing to narrow down 
> on this problem.

One way to get a (huge) trace:

strace -f -o path/to/log/file command to start asterisk

Also try starting asterisk without -p, if you normally start it with it.

-- 
Tzafrir Cohen         sip:tzafrir at local.xorcom.com
icq#16849755          iax:tzafrir at local.xorcom.com
+972-50-7952406          jabber:tzafrir at jabber.org
tzafrir.cohen at xorcom.com     http://www.xorcom.com
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
Kind Regards,
  Nir Simionovich
  Chief Technology Officer
  Atelis PLC




More information about the asterisk-users mailing list