[Backgroundrb-devel] Monit; BackgroundRB; environment variables

hemant gethemant at gmail.com
Mon Sep 22 15:58:26 EDT 2008


On Mon, Sep 22, 2008 at 6:44 PM, Tim Glen <tim at pivotib.com> wrote:
> Are you saying that instead of calling:
> `/path/to/my/app/script/backgroundrb start`
> from a monit script, I should be calling:
> `cd /path/to/my/app && script/backgroundrb start` ?
>
> Should it make any difference? if it actually does, that could be the cause
> of one of my problems...

No that won't make a difference (usually), but from my experience,
monit screws up paths badly, if say for instance, you use relative
paths to start your backgroundrb server (or any daemon basically),
hence usually I specify full path whenever adding daemons to monitor
in monit. When backgroundrb server is starting, it expects,
File.join(File.dirname(__FILE__) + "..") to be RAILS_ROOT, thats the
only fundamental constant it expects to be correct. All the [other]
environment variables(that bdrb needs) it sets itself during startup.

Another thing to keep in mind is, "packet_worker_runner" executable
should be in PATH, when you are using monit. For interactive shells,
its usually in path, but in some cases, when gems binaries are
installed in non standard location (or location thats not in PATH),
can cause problems.


More information about the Backgroundrb-devel mailing list