[Backgroundrb-devel] Advanced Rails Recipe 43 doesn't work, can't figure a work around
gethemant at gmail.com
Sat Jul 19 23:50:12 EDT 2008
On Sun, Jul 20, 2008 at 1:32 AM, Rob Lacey <robl at mail.pigdestroyer.co.uk> wrote:
> I got the same problem when I was trying to implement something in
> production, having read the same Recipie. Exactly the same error in fact. I
> replicated it in the rails console when trying to query the worker. Dropping
> out of the console and starting again actually worked but of course doesn't
> help when you want to query straight away.
> I got the impression that it was trying to query the worker just a fraction
> before the worker was ready. I couldn't gather much more information than
> that. In the end I had to abandon BackgrounDRb for my project and use a
> cronjob and basic queue due to time constraints, so I'd really like to know
> what the problem was so that I don't give up on BDRb alltogether. I have to
> say I found the rubyforge site documentation far too lacking in details so
> again I look forward to see more in depth examples.
> If it is all fixed now then its a bit late for this project so maybe I'll
> give it another look for the next time it BDRb seems like an appropriate
I have a fix for Linux for the above mentioned problem, looking for a
fix for OS X though. Basically, it boils down to "read_nonblock()"
doesn't behave in OS X, as it should. In OSX, read_nonblock ,
*blocks*, hence we had to switch to recv_nonblock(), which doesn't
block in both Linux and OS X. But recv_nonblock is a something of a
beast and doesn't work well for newly created sockets.
More information about the Backgroundrb-devel