Diego Camacho
2008-Mar-09 15:59 UTC
[Backgroundrb-devel] Multiple deployments of same application using backgroundrb
Thanks for this great app. I am having some problems configuring it in my server. I have a single app deployed three times, one is for testing, one is for demoing and the other one is for production. I read that it was unnecesary and it will not work to have multiple instances of backgroundrb for each of my deployments. I read that it was enough to instantiate backgroundrb only once from one of the deployments and the other deployments should use the workers on the deployment where backgroundrb was started. I have been not been able to do this. If I request a worker from a deployment that is not hosting the workers, I get errors in the worker. I am just able to use the workers by restarting the mongrel cluster that handles the deployment and by restarting backgroundrb in the deployment I want to use the worker. As a note, the worker is receiving a ActiveRecord object as a parameter and the error seem to be coming from there. I am getting undefined methods in the activerecord inside the worker. What I am doing wrong ?. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080309/c093a1bf/attachment.html
hemant kumar
2008-Mar-12 01:16 UTC
[Backgroundrb-devel] Multiple deployments of same application using backgroundrb
Hi, First of all really sorry for late reply. On Sun, 2008-03-09 at 10:59 -0500, Diego Camacho wrote:> Thanks for this great app. I am having some problems configuring it in > my server. I have a single app deployed three times, one is for > testing, one is for demoing and the other one is for production. > > > I read that it was unnecesary and it will not work to have multiple > instances of backgroundrb for each of my deployments. I read that it > was enough to instantiate backgroundrb only once from one of the > deployments and the other deployments should use the workers on the > deployment where backgroundrb was started. I have been not been able > to do this. If I request a worker from a deployment that is not > hosting the workers, I get errors in the worker. I am just able to use > the workers by restarting the mongrel cluster that handles the > deployment and by restarting backgroundrb in the deployment I want to > use the worker.You can do this if you are using same backgroundrb.yml file across all deployments and assuming BackgrounDRb server is accessible from all deployed machines. Are you using same config file?> > > As a note, the worker is receiving a ActiveRecord object as a > parameter and the error seem to be coming from there. I am getting > undefined methods in the activerecord inside the worker. >By default, You can''t pass AR objects as arguments, however if you put following in your backgroundrb.yml file you can do that: --- :backgroundrb: :port: 11006 :ip: localhost :environment: production :lazy_load: false Putting lazy_load as false will make sure that your models are loaded even in master process.>
Seemingly Similar Threads
- Deploying to a staging server using Capistrano: how to start up BackgrounDRb?
- Updates and Fixes on Trunk
- Problems sending large results with backgroundrb
- Deploying to production with backgroundrb (capistrano)
- unable to figure out how to get backgroundrb.yml to be used when starting backgroundrb