[Backgroundrb-devel] Thread Pool Size?

Brian Mulloy brian at swivel.com
Thu Dec 7 21:59:44 EST 2006

Hi All,

It might be lack of sleep, but I am struggling to accurately limit our pool
size.   It seems like I can specify it on the server with the -s command
line option and also on the client via the YAML pool_size.  Is that right?
Which one wins?

Our problem is that we are getting about 40 threads on each backgroundrb box
and it's flooring our db and each bgrb box.
We want around 8.

Is there a way to put a hard ceiling on the server side thread pool?

Here is our setup:
5 app boxes, app01 - app05, with 8 mongrel instances each (this is where the
40 comes from, I think)
Each app box points to a load balancer in front of two backgroundrb boxes,
crawler01 and crawler02
this is the backgroundrb.yml on each app box
:host: backgroundrb
:port: 2000
:rails_env: production
:pool_size: 1

We have to keep killing the bgrb.  But we're ok, because all the state of
the workers is stored in a record in the db.  That also allows us to use the
load balancer in front of the bgrb (crawler) tier.

BTW, we our site is www.swivel.com and you see our use of the progress bar
pattern and bgrb (although you won't see much progress until we solve this.

long live bgrb

Brian Mulloy
CEO & Cofounder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061207/2c8b9511/attachment.html 

More information about the Backgroundrb-devel mailing list