Good question. The plan with the DRb protocol is that you can leverage
the monitor command to do this kind of thing for you. Right now
monitor just dumps out some status.
If you''d like to write a command that did this then I''d
recommend this:
1) Go check out daemonize if you''re on POSIX.
2) Setup a daemon that gets the DRb password and then starts a small
loop to hit your rails process(es) to check them. Just hit do the
status call.
3) If it gets the wrong response (exception, takes too long, etc.)
then try to fix it. The "fix" could be rerunning the start command,
trying a graceful shutdown, etc.
I was planning something like this, but if you''re motivated and want to
get into it then feel free.
Zed
On Wed, 19 Oct 2005 00:35:39 +0200
tom/formrausch <tom-srL3XsBkb2wqDJ6do+/SaQ@public.gmane.org> wrote:
> Hi,
>
> I installed lighttpd, scgi and everything is running great.
>
> To ensure everything would run even after a systemcrash I set up a
> cronjob to automatically start lighttpd whenever the server (lighty)
> has to be restarted as well as daedalus.rb to monitor lighttpd.
>
> How do I set up scgi to (re)start if a scgi-process fails or is not
> running at all?
>
> - tom
>
> rails 0.13
> lighttpd 1.4.6
> scgi 0.4.2
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails