Skip to main content
added 2 characters in body
Source Link
Adam Byrtek
  • 1.3k
  • 9
  • 10

Even more reliable solution would be to use a monitoring tool like Monit or god that automatically detects that a process is dead and restarts it whether it happened during reboot or not.

You might think that's an overkill but actually the configuration of Monit is a simple as

check process foo with pidfile /var/run/foo.pid start program "foo_start" stop program "foo_stop" if 5 restarts within 5 cycles then timeout 

Of course the assumption is that the administrator is willing to install the monitoring tool for you so it could be a chicken and egg problem :)

Even more reliable solution would be to use a monitoring tool like Monit or god that automatically detects that a process is dead and restarts it whether it happened during reboot or not.

You might think that's an overkill but actually the configuration of Monit is a simple as

check process foo with pidfile /var/run/foo.pid start program "foo_start" stop program "foo_stop" if 5 restarts within 5 cycles then timeout 

Of course the assumption is that the administrator is willing to install the monitoring tool for you so it could be chicken and egg problem :)

Even more reliable solution would be to use a monitoring tool like Monit or god that automatically detects that a process is dead and restarts it whether it happened during reboot or not.

You might think that's an overkill but actually the configuration of Monit is a simple as

check process foo with pidfile /var/run/foo.pid start program "foo_start" stop program "foo_stop" if 5 restarts within 5 cycles then timeout 

Of course the assumption is that the administrator is willing to install the monitoring tool for you so it could be a chicken and egg problem :)

Source Link
Adam Byrtek
  • 1.3k
  • 9
  • 10

Even more reliable solution would be to use a monitoring tool like Monit or god that automatically detects that a process is dead and restarts it whether it happened during reboot or not.

You might think that's an overkill but actually the configuration of Monit is a simple as

check process foo with pidfile /var/run/foo.pid start program "foo_start" stop program "foo_stop" if 5 restarts within 5 cycles then timeout 

Of course the assumption is that the administrator is willing to install the monitoring tool for you so it could be chicken and egg problem :)