Hi All,
As far as I can see if a child dies due to segmentation fault Kamailio stops all the childs and it exits.
Is there a possibility to change this behaviour to a kind of "respawn the child" way ?
What do you think is the best way to keep Kamailio running on Ubuntu ? On RHEL ?
Thanks, Misi
On 31 Mar 2015, at 11:11, Mihaly Zachar zmihaly@gmail.com wrote:
Hi All,
As far as I can see if a child dies due to segmentation fault Kamailio stops all the childs and it exits.
Is there a possibility to change this behaviour to a kind of "respawn the child" way ?
What do you think is the best way to keep Kamailio running on Ubuntu ? On RHEL ?
In my view a software that gets segementation faults needs to be fixed so that it does not happen. Anything else is workarounds that may hide the fact that you have a serious bug.
Tell us more about the segfault and help us fix it.
Thank you, /Olle
On 03/31/15 11:15, Olle E. Johansson wrote:
On 31 Mar 2015, at 11:11, Mihaly Zachar zmihaly@gmail.com wrote:
Hi All,
As far as I can see if a child dies due to segmentation fault Kamailio stops all the childs and it exits.
Is there a possibility to change this behaviour to a kind of "respawn the child" way ?
What do you think is the best way to keep Kamailio running on Ubuntu ? On RHEL ?
In my view a software that gets segementation faults needs to be fixed so that it does not happen. Anything else is workarounds that may hide the fact that you have a serious bug.
Tell us more about the segfault and help us fix it.
Hi Olle,
I agree..
Currently we don't know any issues but there might be bugs in our modules, that is why we would like to prepare the system for the worst case scenario and deploy Kamailio with a kind of safety belt if possible.
Cheers, Misi
Hello,
On 31/03/15 11:19, Mihaly Zachar wrote:
On 03/31/15 11:15, Olle E. Johansson wrote:
On 31 Mar 2015, at 11:11, Mihaly Zachar zmihaly@gmail.com wrote:
Hi All,
As far as I can see if a child dies due to segmentation fault Kamailio stops all the childs and it exits.
Is there a possibility to change this behaviour to a kind of "respawn the child" way ?
What do you think is the best way to keep Kamailio running on Ubuntu ? On RHEL ?
In my view a software that gets segementation faults needs to be fixed so that it does not happen. Anything else is workarounds that may hide the fact that you have a serious bug.
Tell us more about the segfault and help us fix it.
Hi Olle,
I agree..
Currently we don't know any issues but there might be bugs in our modules, that is why we would like to prepare the system for the worst case scenario and deploy Kamailio with a kind of safety belt if possible.
you can run some supervising applications that (re)start a program when not running. One of them is 'monit', but you can find many more in linux world.
Cheers, Daniel
On Tuesday 31 March 2015 11:15:09 Olle E. Johansson wrote:
In my view a software that gets segementation faults needs to be fixed so that it does not happen. Anything else is workarounds that may hide the fact that you have a serious bug.
That is a good view, but in the meantime you'll have to make sure your production servers keep running.
I use supervisor/sipsak as watchdog to restart if there is no kamailio running.
kamcheck to start from supervisor, script keeps running if where is atleast 1 valid response every 3 tries (about 1 per sec). If 3 consecutive fails, stop kamailio (which might fail) and then nuke it from orbit just to be save. Script dies and supervisor will restart it, relaunching kamailio.
#!/bin/sh err=0 /etc/init.d/kamailio start
while [ $err -lt 3 ] do sipsak -s sip:ping@127.0.0.1 2> /dev/null
if [ $? -eq 0 ] then err=0 else err=$(( $err + 1 )) date echo error count: $err fi
sleep 1 done
/etc/init.d/kamailio stop killall -9 kamailio