[Backgroundrb-devel] Cannot start workers in production mode

David Balatero david.balatero at gmail.com
Thu Aug 9 15:27:55 EDT 2007


I'm having a hell of a time with this. I tried checking out a new version
from trunk, as well as modifying my backgroundrb.yml to what you suggested.
Next, I'm going to try running it on a different server and see if that
fixes this.

- David

On 8/8/07, hemant <gethemant at gmail.com> wrote:
>
> On 8/8/07, David Balatero <david.balatero at gmail.com> wrote:
> > I have a job that I am starting from a Rails controller in production
> mode
> > using MiddleMan:
> >
> > MiddleMan.new_worker(:class => :import_ccg_category_worker, :args => {
> > :category_id => @ category.id, :remote_category_id =>
> > params[:remote_category_id], :description => "Importing CCG products for
> > #{@category.name}" })
> >
> > Both of the category ID variables are just basic integers. I have other
> > places in my app that I use workers, and they are all producing the same
> > error. I get the following on stderr when I run script/backgroundrb run:
> >
> > undefined method `wait' for nil:NilClass - (NoMethodError)
> >
> /mnt/home/magicarsenal/admin/releases/20070807014939/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:217:in
> > `new_worker'
> >
> /mnt/home/magicarsenal/admin/releases/20070807014939/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:36:in
> > `dispatch'
> >
> /mnt/home/magicarsenal/admin/releases/20070807014939/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in
> > `initialize'
> >
> /mnt/home/magicarsenal/admin/releases/20070807014939/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in
> > `new'
> >
> /mnt/home/magicarsenal/admin/releases/20070807014939/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in
> > `dispatch'
> >
> /mnt/home/magicarsenal/admin/releases/20070807014939/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:199:in
> > `new_worker'
> > /usr/lib/ruby/1.8/drb/drb.rb:1555:in `__send__'
> > /usr/lib/ruby/1.8/drb/drb.rb:1555:in
> > `perform_without_block'
> > /usr/lib/ruby/1.8/drb/drb.rb:1515:in `perform'
> > /usr/lib/ruby/1.8/drb/drb.rb:1589:in `main_loop'
> > /usr/lib/ruby/1.8/drb/drb.rb:1585:in `loop'
> > /usr/lib/ruby/1.8/drb/drb.rb:1585:in `main_loop'
> > /usr/lib/ruby/1.8/drb/drb.rb:1581:in `start'
> > /usr/lib/ruby/1.8/drb/drb.rb:1581:in `main_loop'
> > /usr/lib/ruby/1.8/drb/drb.rb:1430:in `run'
> > /usr/lib/ruby/1.8/drb/drb.rb:1427:in `start'
> > /usr/lib/ruby/1.8/drb/drb.rb:1427:in `run'
> > /usr/lib/ruby/1.8/drb/drb.rb:1347:in `initialize'
> > /usr/lib/ruby/1.8/drb/drb.rb:1627:in `new'
> > /usr/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
> >
> /mnt/home/magicarsenal/admin/releases/20070807014939/vendor/plugins/backgroundrb/server/lib/backgroundrb_server.rb:315:in
> > `run'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6
> /lib/daemons/application.rb:193:in
> > `call'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6
> /lib/daemons/application.rb:193:in
> > `start_proc'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6
> /lib/daemons/application.rb:203:in
> > `call'
> > /usr/lib/ruby/gems/1.8/gems/daemons-
> > 1.0.6/lib/daemons/application.rb:203:in `start_proc'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6
> /lib/daemons/application.rb:233:in
> > `start'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6
> /lib/daemons/controller.rb:72:in
> > `run'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6/lib/daemons.rb:185:in
> > `run_proc'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6/lib/daemons/cmdline.rb:105:in
> > `call'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6/lib/daemons/cmdline.rb:105:in
> > `catch_exceptions'
> > /usr/lib/ruby/gems/1.8/gems/daemons-1.0.6/lib/daemons.rb:184:in
> > `run_proc'
> >
> /mnt/home/magicarsenal/admin/releases/20070807014939/vendor/plugins/backgroundrb/server/lib/backgroundrb_server.rb:301:in
> > `run'
> >  script/backgroundrb:29
> >
> > I am at a loss to explain what is going on here. BackgrounDRb::VERSION
> > reports I run version 0.2.1 of backgroundrb. I have version 1.2.1 of
> slave,
> > and version 1.0.6 of daemons installed. My backgroundrb.yml file is the
> > following:
> >
> > ---
> > port: "22222"
> > timer_sleep: 60
> > load_rails: true
> > environment: production
> > host: 127.0.0.1
> > database_yml: config/database.yml
> > acl:
> >   deny: all
> >   allow: localhost 127.0.0.1
> >   order: deny,allow
> >
> >
> > Hopefully someone can help me get through this, because I am in the
> middle
> > of deploying our first app, and it would suck to be delayed any more.
> >
> > Thanks in advance!
> > David Balatero
> >
>
> Hey David,
>
> please update your plugin with trunk and make sure that you have slave
> 1.2.1.
>
> Also can you use this config file and see if you still get the error,
> i see couple of options that you are using aren't suppored at all:
>
> --
> :host: 127.0.0.1
> :port: 2999
> :rails_env: production
> :worker_dir: lib/workers
> :acl:
>   deny: all
>   allow: localhost 127.0.0.1
>   order: deny,allow
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070809/a78f1d3f/attachment.html 


More information about the Backgroundrb-devel mailing list