From: ara.t.howard@... Date: 2006-09-20T05:31:26+09:00 Subject: Re: Why would a DRb process shut down? On Wed, 20 Sep 2006, Ben Johnson wrote: > Any tips on keeping the processes running? i use a technique i call 'immortal daemon'. rq and dirwatch both use it. it works like this: - daemon uses a well know lockfile to signal it's existence. see my lockfile class for a nfs-safe impl. so, take a daemon named 'foo_d' for example. we'll assume that it uses /home/$USER/.foo_d/lock as it's lockfile. - the options given to the lockfile.lock call are to aquire the lock and fail immediately (vs waiting) if another process holds the lock. the lockfile class i wrote knows about dead processes and stale locks, so you needn't worry about that. - cron your daemon to start every 15 minutes. if the process isn't running, at any time for any reason, it will be restarted. this works after reboot and for other transient (network for example) errors. i have used this approach in production systems with great success for several years. it's robust and does not even require root privs. regards. -a -- in order to be effective truth must penetrate like an arrow - and that is likely to hurt. -- wei wu wei