--respawn

Christian Stredicke
CEO of Vodia Networks

The PBX is a critical service in most environments. This is a service that is supposed to be up 24 hours, 7 days a week. We have designed the software from day one to be a very stable service. Over the past ten years, the service was so stable that we did not have any special feature that takes measures for the case the the service fails. This is quite remarkable, considering other services practically restart every day at least once.
In Windows, the service manager takes care about automatic restart of services that have failed. This helps running Windows services in a more reliable fashion. Even though we feel the software is even more stable than ever, it is time to make sure that also the Linux and other Unix-flavors can automatically recover from crash events without administrator intervention.
Depending on the Linux flavor, there are already several ways to get this done. For example daemon (1) has an option that takes care about the problem. We assume that in many installations this has been done. However looking at Debian this topic gets complicated. Also on the embedded systems like the Raspberry Pi it might be a problem getting this working properly.
This is why we added a new command line option for the pbx --respawn. What it does it to fork a child process and wait until it terminates, then forks another child process and so on. If the child process should have a problem whatsoever, it will quickly recover from that problem and start the PBX up again. This will work pretty much on any Unix-based system.
We made the option "opt-in", so that there is no difference when starting the service up with the existing command line options. We will probably change the installer scripts for CentOS, Debian and FreeBSD to include this new option, so that new installations will have this extra precaution included from day one.
As for software updates, existing the process from the web interface will not update the software. This is something we might have to look into in future versions, so that software updates become easier and don't require a restart of the whole server.
The option will be included in the 57 release.