Jacob Atzen
2007-Jan-30 14:25 UTC
[Backgroundrb-devel] Backgroundrb weirdness with multiple mongrels
Hi list, I''m having some issues getting backgroundrb to play nice with more than one mongrel. When I run my app on a single mongrel instance it works fine. I have two different problems show up in my backgrounrb_server.log. The top of the backtrace is shown here: 20070130-12:03:03 (92473) failed to find slave socket - (RuntimeError) 20070130-12:03:03 (92473) /usr/local/lib/ruby/gems/1.8/gems/slave-1.2.0/lib/slave.rb:435:in `initialize'' 20070130-12:03:03 (92473) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:210:in `new'' 20070130-12:03:03 (92473) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:210:in `new_worker'' 20070130-12:03:03 (92473) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:36:in `dispatch'' 20070130-12:03:03 (92473) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in `initialize'' 20070130-12:03:03 (92473) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in `new'' 20070130-12:03:03 (92473) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in `dispatch'' 20070130-12:03:03 (92473) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:199:in `new_worker'' And: 20070130-12:00:05 (92080) connection closed - (DRb::DRbConnError) 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:570:in `load'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:632:in `recv_reply'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:921:in `recv_reply'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:1195:in `send_message'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:1086:in `method_missing'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:1170:in `open'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/1.8/drb/drb.rb:1072:in `respond_to?'' 20070130-12:00:05 (92080) /usr/local/lib/ruby/gems/1.8/gems/slave-1.2.0/lib/slave.rb:454:in `initialize'' 20070130-12:00:05 (92080) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:210:in `new'' 20070130-12:00:05 (92080) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:210:in `new_worker'' 20070130-12:00:05 (92080) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:36:in `dispatch'' 20070130-12:00:05 (92080) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in `initialize'' 20070130-12:00:05 (92080) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in `new'' 20070130-12:00:05 (92080) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/thread_pool.rb:22:in `dispatch'' 20070130-12:00:05 (92080) /usr/local/www/rails-apps/myapp/releases/20070130101502/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:199:in `new_worker'' As can be seen it seems to stem from a call to new_worker. Though the issue also seems to prop up when requesting an existing worker. Any ideas on where I should start to look? -- Thanks, - Jacob Atzen
Jacob Atzen
2007-Feb-28 09:34 UTC
[Backgroundrb-devel] Backgroundrb weirdness with multiple mongrels
On Tue, Jan 30, 2007 at 03:25:49PM +0100, Jacob Atzen wrote:> Hi list, > > I''m having some issues getting backgroundrb to play nice with more than > one mongrel. When I run my app on a single mongrel instance it works > fine. > > I have two different problems show up in my backgrounrb_server.log. The > top of the backtrace is shown here:[snip]> As can be seen it seems to stem from a call to new_worker. Though the > issue also seems to prop up when requesting an existing worker. > > Any ideas on where I should start to look?A little update on this. It seems that I can instantiate as many workers as I want from one process. But when I hit another process it will fail within a few requests, something like: localhost:3000/new_worker localhost:3000/new_worker localhost:3000/new_worker localhost:3000/new_worker localhost:3001/new_worker localhost:3001/new_worker localhost:3001/new_worker *boom* If I only instantiate one worker and reuse it across requests there seems to be no problem. Am I the only one experiencing this? -- Thanks, - Jacob Atzen