views:

26

answers:

1

i have a wsgi server which use paste,for some unkonw reason,it will often crash,so i want to has a application or just some package can help me to slove this,when it crashed automaticly kill the process and restart it.Any advice is welcome.

+1  A: 

I'd use your operational system's service integration to do that. For example, on debian linux, there's start-stop-daemon. On windows, there's the service management.

It's the proven, well integrated way, provided by the operational system itself, to keep an application running.

Just make your installation program register your service with the native service management system.

nosklo
my os is ubuntu server,could you give more detail information about how to use it,or some keywords i can gg
mlzboy
@mlzboy: ubuntu uses `start-stop-daemon` just like debian. For more information type `man start-stop-daemon`. You can check existing startup stripts at `/etc/init.d` for examples.
nosklo