[Asterisk-Users] Best way to automatically stop and start Asterisk nightly

Tzafrir Cohen tzafrir at cohens.org.il
Wed Dec 14 11:36:54 MST 2005


On Wed, Dec 14, 2005 at 08:49:06AM -0700, Chuck Bunn wrote:
> Hi,
> 
> I am planning on restarting asterisk nightly as I seem to be 
> experiencing some sort of memory leak (Asterisk slows down over time). 

This is not an indication of a memory leak. The size of the asterisk
process:

  ps `cat /var/run/asterisk/asterisk.pid` -o vsize -o rss

Do those inflate over time?

> I 
> have reviewed the Asterisk suggestions for management and one item is 
> the routine rebooting of Asterisk.  Since I have Asterisk 1.2.1 what is 
> the recommend way to implement an automatic stop and start of asterisk 

asterisk -rx 'restart now' from a daily cron job?

Mind you, this is a bad patch and *NOT A FIX*.

> (there are changes in 1.2 with reload and restart) and is this enough or 
> should I restart the hardware as well??

If you suspect a user-space memory leak than restarting the application
should free that memory.

BTW: what do you mean by "slow down"?

-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend




More information about the asterisk-users mailing list