[Backgroundrb-devel] Too many clients already

Todd Tyree todd at snappl.co.uk
Mon Aug 11 07:45:43 EDT 2008


>
> http://pastie.org/222713
>
> We get this error when running the test several times in a row.  It
> could be that our test is not properly closing the connection to
> backgroundrb.  The test reports that the error occurs in the
> before(:all) block in an RSpec.
>
> Thanks for your help!
>
> dan
>
> Hi Dan,

I'm a bit late to the party on this one, and I'm afraid I can't get in to
pastie at the moment, but I've just had a similar-sounding problem myself.
If you're doing anything with the model in your worker the error is probably
caused by the sql connection not being released when the thread is
complete.  Try adding:

    ActiveRecord::Base.verify_active_connections!

to the end of your worker method (and/or upping the number of concurrent
connections available on whatever sql server you are using).

Best,
Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080811/03b3a360/attachment.html>


More information about the Backgroundrb-devel mailing list