[Backgroundrb-devel] ActiveRecord strangeness inside workers

hemant gethemant at gmail.com
Tue Jul 8 00:02:19 EDT 2008

On Tue, Jul 8, 2008 at 2:51 AM, Rob Lacey <robl at mail.pigdestroyer.co.uk> wrote:
> Hi there,
> This is my first post...erm, so if you're kind there'll be cake for desert.
> I have been implementing a BackgrounDRB solution for a few remote calls from
> my rails app, sometimes the call's response is immediate and sometimes it
> takes 10mins so it seems like a likely candidate. We've been plugging away
> at this problem all day but seems that we have a recurring problem that we
> are unable to destroy a collection objects within our worker method with no
> real indication why. I am sure this can't be related to BackgrounDRB itself
> as I can't see how it could break ActiveRecord. However, the server logs
> don't show the SQL delete statement which is seemingly failing, is there a
> way I can make the log output more verbose to be more helpful?

Few suggestions:

1> Use C mysql bindings. You might be already using, but just make
sure. gem install mysql does the trick.
2> Reduce the number of threads in thread pool using pool_size(2) in
worker code.
3> Paste the worker code, so that everyone else can reproduce it to
fix the issue.

More information about the Backgroundrb-devel mailing list