Matt G
2004-Oct-18 14:11 UTC
[Asterisk-Users] Quick question regarding daily restart of asterisk
Hi All, I have a quick question regarding restarting (and/or stopping/restarting) asterisk daily -- Should it be done? I've seen conflicting answers, some people have told me that the only reason for asterisk to be stopped/started daily was for mpg123 causing many childs, which has since been fixed using 'no buffer' or 'nb' appended to the line in musiconhold.conf. Others have told me there is no reason whatsoever to restart/stop it, yet there's instructions on how to do it on the wiki, are these just outdated? Is there any other reason why one would want to stop and restart asterisk daily? (or at any other scheduled time?) On a related note, is asterisk -rx "restart now" the equivalent of asterisk -rx "stop now" && /usr/sbin/safe_asterisk (or whatever command is used to restart it)?. I have a job cronned on a slackware system to restart it daily using -rx "restart now" and it creates a new PID, and Process Time, but when I run the same thing on Redhat 9 I get an error saying that it exited on sig 13. I'm sure this is just a redhat specific thing as this isn't the only problem I'm running into, but it would be nice to find some answers. Thanks, Matt
Deon Rodden
2004-Oct-18 14:22 UTC
[Asterisk-Users] Quick question regarding daily restart of asterisk
I wouldn't recommend a reload. More than once I've issued a "reload" to Asterisk and it just sat there, never actually reloaded. Went into limbo, wouldn't accept any future commands either. Had to kill -9 the process and load it again. Plus certain changes you make, like certain changes to the iax.conf file, don't get loaded when you do a reload. I spent an hour trying to fix a problem, modify the iax, reload asterisk, problem still there. Finally stopped asterisk, started it clean, problem was gone, same exact config. As far as "stop now" and starting it again. I don't truly see the need. Every once in a while I've had to do it to fix a quality issue or memory problem or something odd. Maybe instead of once a day, once a week. Would probably be good. I may implement this myself. I'd recommend the "asterisk -rx "stop now" && /usr/sbin/safe_asterisk" method to accomplish your goal. Maybe even a "stop now" && sleep 1 && killall -9 asterisk && sleep 1 && /usr/sbin/safe_asterisk" Would take a little longer, but would ensure Asterisk is dead before reloading it. -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Matt G Sent: Monday, October 18, 2004 5:12 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] Quick question regarding daily restart of asterisk Hi All, I have a quick question regarding restarting (and/or stopping/restarting) asterisk daily -- Should it be done? I've seen conflicting answers, some people have told me that the only reason for asterisk to be stopped/started daily was for mpg123 causing many childs, which has since been fixed using 'no buffer' or 'nb' appended to the line in musiconhold.conf. Others have told me there is no reason whatsoever to restart/stop it, yet there's instructions on how to do it on the wiki, are these just outdated? Is there any other reason why one would want to stop and restart asterisk daily? (or at any other scheduled time?) On a related note, is asterisk -rx "restart now" the equivalent of asterisk -rx "stop now" && /usr/sbin/safe_asterisk (or whatever command is used to restart it)?. I have a job cronned on a slackware system to restart it daily using -rx "restart now" and it creates a new PID, and Process Time, but when I run the same thing on Redhat 9 I get an error saying that it exited on sig 13. I'm sure this is just a redhat specific thing as this isn't the only problem I'm running into, but it would be nice to find some answers. Thanks, Matt _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Darren Sessions
2004-Oct-18 14:36 UTC
[Asterisk-Users] Quick question regarding daily restart of asterisk
I can tell you from first hand experience that unless you've got +1000 extensions completely configured, it's not a problem in the slightest. After that, you'll start getting "to many files open" messages (on a vanilla system install) and the server will go temporarily unresponsive (which can be semi-remedied by modifying your OS's max open files - but even then * had problems). On Oct 18, 2004, at 5:11 PM, Matt G wrote:> Hi All, > > I have a quick question regarding restarting (and/or > stopping/restarting) asterisk daily -- Should it be done? > > I've seen conflicting answers, some people have told me that the only > reason for asterisk to be stopped/started daily was for mpg123 causing > many childs, which has since been fixed using 'no buffer' or 'nb' > appended to the line in musiconhold.conf. > > Others have told me there is no reason whatsoever to restart/stop it, > yet there's instructions on how to do it on the wiki, are these just > outdated? > > Is there any other reason why one would want to stop and restart > asterisk daily? (or at any other scheduled time?) > > On a related note, is asterisk -rx "restart now" the equivalent of > asterisk -rx "stop now" && /usr/sbin/safe_asterisk (or whatever > command is used to restart it)?. I have a job cronned on a slackware > system to restart it daily using -rx "restart now" and it creates a > new PID, and Process Time, but when I run the same thing on Redhat 9 I > get an error saying that it exited on sig 13. I'm sure this is just a > redhat specific thing as this isn't the only problem I'm running into, > but it would be nice to find some answers. > > Thanks, > Matt > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Rich Adamson
2004-Oct-18 15:23 UTC
[Asterisk-Users] Quick question regarding daily restart of asterisk
> I have a quick question regarding restarting (and/or > stopping/restarting) asterisk daily -- Should it be done? > > I've seen conflicting answers, some people have told me that the only > reason for asterisk to be stopped/started daily was for mpg123 causing > many childs, which has since been fixed using 'no buffer' or 'nb' > appended to the line in musiconhold.conf. > > Others have told me there is no reason whatsoever to restart/stop it, > yet there's instructions on how to do it on the wiki, are these just > outdated? > > Is there any other reason why one would want to stop and restart > asterisk daily? (or at any other scheduled time?) > > On a related note, is asterisk -rx "restart now" the equivalent of > asterisk -rx "stop now" && /usr/sbin/safe_asterisk (or whatever command > is used to restart it)?. I have a job cronned on a slackware system to > restart it daily using -rx "restart now" and it creates a new PID, and > Process Time, but when I run the same thing on Redhat 9 I get an error > saying that it exited on sig 13. I'm sure this is just a redhat specific > thing as this isn't the only problem I'm running into, but it would be > nice to find some answers.The only reason to ever restart any server is if there are problems that have not yet been fixed (such as memory not being released, etc). Obviously some exceptions for MS stuff. Some older Admin's will suggest that systems should be rebooted weekly, etc. That's only needed "if" there is a problem. The effort should be focused on fixing the root-cause, not rebooting.
David H Hickman
2004-Oct-19 00:14 UTC
[Asterisk-Users] Quick question regarding daily restart of asterisk
This tends to be a religious issue. I guess I am an older admin. :) I come from the school of thought that it is a good idea to reboot a server that is not meant to be used interactivly (console or terminal) on a schedule. Most software does not require it. In my experience, the systems that have some sort of auto reboot, typically run for years without any real maintenance. My * box reboots itself on sundays at 0300. It also rsyncs config files and voicemail on an hourly basis with another server ( that does not reboot. All it does is act as a samba and nfs fileserver.) Calls are scp as soon as they are combined after the call. --- David Hickman PH 314-433-0133 x31 Fax 314-865-4752 AIM: fsckrmrf ICQ: 7059948 YahooIM: dhickman PGP Prefered - Use current key from the keyservers. On Oct 18, 2004, at 16:11, Matt G wrote:> Hi All, > > I have a quick question regarding restarting (and/or > stopping/restarting) asterisk daily -- Should it be done? > > I've seen conflicting answers, some people have told me that the only > reason for asterisk to be stopped/started daily was for mpg123 causing > many childs, which has since been fixed using 'no buffer' or 'nb' > appended to the line in musiconhold.conf. > > Others have told me there is no reason whatsoever to restart/stop it, > yet there's instructions on how to do it on the wiki, are these just > outdated? > > Is there any other reason why one would want to stop and restart > asterisk daily? (or at any other scheduled time?) > > On a related note, is asterisk -rx "restart now" the equivalent of > asterisk -rx "stop now" && /usr/sbin/safe_asterisk (or whatever > command is used to restart it)?. I have a job cronned on a slackware > system to restart it daily using -rx "restart now" and it creates a > new PID, and Process Time, but when I run the same thing on Redhat 9 I > get an error saying that it exited on sig 13. I'm sure this is just a > redhat specific thing as this isn't the only problem I'm running into, > but it would be nice to find some answers. > > Thanks, > Matt > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Peter Svensson
2004-Oct-19 00:34 UTC
[Asterisk-Users] Quick question regarding daily restart of asterisk
On Tue, 19 Oct 2004, David H Hickman wrote:> This tends to be a religious issue. I guess I am an older admin. :) > I come from the school of thought that it is a good idea to > reboot a server that is not meant to be used interactivly (console or > terminal) on a schedule. Most software does not require it. In my > experience, the systems that have some sort of auto reboot, typically > run for years without any real maintenance.Most of our servers stay up until there is some need (such as power reconfiguration) to power them down. The time between restarts is usually about a year. The asterisk box is close to half a year now. Asterisk itself has been restarted once since we needed to change a configuration that required a restart to reload. Peter