[Backgroundrb-devel] trouble stopping backgroundrb

Ryan Case mrryancase at gmail.com
Wed Sep 17 17:48:22 EDT 2008

I'm not able to reproduce the issue consistently. Often killing (-9) a
packet_worker will create the issue, but not always.

Jonathan  - thanks for the info! skipping the pgid sounds interesting,
since what I do to manually fix it is usually just kill the pid for
the backgroundrb process (however, as Hemant mentioned, I guess that
might leave workers still running). And it definitely seems like it is
failing on the kill block and deleting the pid file even tho the
process is still running.

Hemant - I don't see too much as far as exceptions when I run into
this issue. The debug log does show the "Address already in use -
bind(2) (Errno::EADDRINUSE)" error when start tries to run, but I
don't see exceptions for the stop in the log.

When I run stop however, I do get the "Deleting pid file" output,
which looks like Errno::ESRCH is being rescued. (Not sure if that is
correct, or if there is a way to see more detail on the exception...)

Thanks everyone,

On Wed, Sep 17, 2008 at 4:14 PM, Woody Peterson
<woody at crystalcommerce.com> wrote:
> I too have been having the same issue. Every time I try to restart
> backgroundrb after an update to our application (about once a day), I have
> to forcefully kill it myself. However, I haven't been able to reproduce it
> in a controlled setting. After I kill and start it, it all works ok. I tried
> killing packet_worker processes (even with -9), but it still shuts down
> correctly on the stop command. I'll let it run for a while and try tomorrow,
> but has anyone been able to predictably reproduce the issue?
> -Woody
> (debian etch, packet 0.1.10)
> On Sep 16, 2008, at 9:11 AM, Ryan Case wrote:
>> Hi folks -
>> I'm having trouble getting backgroundrb to stop after one of the
>> packet_worker_r processes dies.
>> If backgroundrb is running properly,
>> "/path/to/application/script/backgroundrb stop" works fine, but often
>> one of the packet_worker_r processes dies, and the stop command no
>> longer works after that (it runs, but it does not stop the processes,
>> and so then start doesn't work).
>> The only thing that seems to work at that point is to manually kill
>> the processes that are still running, and then the start works, but
>> that is going to make restarting via monit a lot less clean.
>> Any ideas would be much appreciated!
>> I'm using github version of backgroundrb, and packet 0.1.13 running on
>> ubuntu.
>> Thanks!
>> Ryan
>> _______________________________________________
>> Backgroundrb-devel mailing list
>> Backgroundrb-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel

More information about the Backgroundrb-devel mailing list