From jezchatfield at gmail.com Mon Dec 1 02:35:48 2008 From: jezchatfield at gmail.com (Jeremy Chatfield) Date: Mon, 1 Dec 2008 07:35:48 +0000 Subject: [Backgroundrb-devel] Problem with scheduled Task - gets executed several times In-Reply-To: References: Message-ID: <003C2A9E-FFD3-4EB0-B381-F28A2814906B@gmail.com> In your backgroundrb.yml, you've used an asterisk for the seconds- that means 'run every second'. Not sure why it doesn't stop. On 30 Nov 2008, at 19:05, Jochen Kaechelin wrote: > I have the following: > > --- > :backgroundrb: > :port: 11006 > :ip: 0.0.0.0 > :environment: development > :persistent_disabled: true > :schedules: > :inventory_worker: > :dummy: > :trigger_args: * */10 * * * * > > > class InventoryWorker < BackgrounDRb::MetaWorker > set_worker_name :inventory_worker > # reload_on_schedule true > > def create(args = nil) > end > > def dummy(args = nil) > Inventory.create(:kadisnr => "10000", :inventory => 1) > end > end > > > >> MiddleMan.worker(:inventory_worker).worker_info > => {:status=>:running, :worker=>:inventory_worker, :worker_key=>nil} > > > The Task getes executed after 10 minutes but the logfile will show me: > > Inventory Create (0.2ms) INSERT INTO `inventories` (`updated_at`, > `kadisnr`, `inventory`, `created_at`) VALUES('2008-11-30 19:00:41', > '10000', 1, '2008-11-30 19:00:41') > SQL (0.4ms) COMMIT > SQL (0.1ms) BEGIN > Inventory Create (0.2ms) INSERT INTO `inventories` (`updated_at`, > `kadisnr`, `inventory`, `created_at`) VALUES('2008-11-30 19:00:42', > '10000', 1, '2008-11-30 19:00:42') > SQL (0.4ms) COMMIT > SQL (0.1ms) BEGIN > > > so I get hundreds of new database entries. > > Why is the dummy method executed several times? And why will it > never stop again? > > -- > Jochen > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel From toastkid.williams at gmail.com Mon Dec 1 04:51:20 2008 From: toastkid.williams at gmail.com (Max Williams) Date: Mon, 1 Dec 2008 09:51:20 +0000 Subject: [Backgroundrb-devel] Marking a job as failed? Message-ID: I'm using backgroundrb to build zip files. If the zipping fails, for example because some of the files intended to be zipped are missing, i want to mark the job as failed. What's the best way to do this? thanks, max -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.yeung at gearboxsoft.com Tue Dec 2 05:31:54 2008 From: william.yeung at gearboxsoft.com (Yeung William) Date: Tue, 2 Dec 2008 18:31:54 +0800 Subject: [Backgroundrb-devel] How to check the current enqueued task for a particular worker? Message-ID: I tried to check the API and found the method MetaWorker#check_for_enqueued_tasks, but how is that suppose to be invoked? can that be done with the worker proxy? From gethemant at gmail.com Tue Dec 2 12:17:01 2008 From: gethemant at gmail.com (hemant) Date: Tue, 2 Dec 2008 22:47:01 +0530 Subject: [Backgroundrb-devel] Problem with scheduled Task - gets executed several times In-Reply-To: References: Message-ID: On Mon, Dec 1, 2008 at 12:35 AM, Jochen Kaechelin wrote: > I have the following: > > --- > :backgroundrb: > :port: 11006 > :ip: 0.0.0.0 > :environment: development > :persistent_disabled: true > :schedules: > :inventory_worker: > :dummy: > :trigger_args: * */10 * * * * > > > class InventoryWorker < BackgrounDRb::MetaWorker > set_worker_name :inventory_worker > # reload_on_schedule true > > def create(args = nil) > end > > def dummy(args = nil) > Inventory.create(:kadisnr => "10000", :inventory => 1) > end > end > > >>> MiddleMan.worker(:inventory_worker).worker_info > => {:status=>:running, :worker=>:inventory_worker, :worker_key=>nil} > > > The Task getes executed after 10 minutes but the logfile will show me: > > Inventory Create (0.2ms) INSERT INTO `inventories` (`updated_at`, > `kadisnr`, `inventory`, `created_at`) VALUES('2008-11-30 19:00:41', '10000', > 1, '2008-11-30 19:00:41') > SQL (0.4ms) COMMIT > SQL (0.1ms) BEGIN > Inventory Create (0.2ms) INSERT INTO `inventories` (`updated_at`, > `kadisnr`, `inventory`, `created_at`) VALUES('2008-11-30 19:00:42', '10000', > 1, '2008-11-30 19:00:42') > SQL (0.4ms) COMMIT > SQL (0.1ms) BEGIN > > > so I get hundreds of new database entries. > > Why is the dummy method executed several times? And why will it never stop > again? Are you saying that those database queries are getting executed several times between the 10 minute interval? From gethemant at gmail.com Tue Dec 2 12:18:03 2008 From: gethemant at gmail.com (hemant) Date: Tue, 2 Dec 2008 22:48:03 +0530 Subject: [Backgroundrb-devel] How to check the current enqueued task for a particular worker? In-Reply-To: References: Message-ID: On Tue, Dec 2, 2008 at 4:01 PM, Yeung William wrote: > I tried to check the API and found the method > MetaWorker#check_for_enqueued_tasks, but how is that suppose to be invoked? > can that be done with the worker proxy? No, usually thats an internal method, usually not exposed through the MiddleMan proxy. From gethemant at gmail.com Tue Dec 2 12:19:40 2008 From: gethemant at gmail.com (hemant) Date: Tue, 2 Dec 2008 22:49:40 +0530 Subject: [Backgroundrb-devel] Marking a job as failed? In-Reply-To: References: Message-ID: If you are using persistent job, then currently there is no support for marking a job as failed. We can easily patch it for this. 2008/12/1 Max Williams : > I'm using backgroundrb to build zip files. If the zipping fails, for > example because some of the files intended to be zipped are missing, i want > to mark the job as failed. What's the best way to do this? > > thanks, max > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org From toastkid.williams at gmail.com Tue Dec 2 12:21:01 2008 From: toastkid.williams at gmail.com (Max Williams) Date: Tue, 2 Dec 2008 17:21:01 +0000 Subject: [Backgroundrb-devel] Marking a job as failed? In-Reply-To: References: Message-ID: Marking the persistent job as failed would be great - currently i'm doing a workaround where if a job has as finished_at time but has finished=false then it's considered to have failed. This is not a great solution though :) cheers max 2008/12/2 hemant > If you are using persistent job, then currently there is no support > for marking a job as failed. We can easily patch it for this. > > > > 2008/12/1 Max Williams : > > I'm using backgroundrb to build zip files. If the zipping fails, for > > example because some of the files intended to be zipped are missing, i > want > > to mark the job as failed. What's the best way to do this? > > > > thanks, max > > > > _______________________________________________ > > Backgroundrb-devel mailing list > > Backgroundrb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > > > > > -- > Let them talk of their oriental summer climes of everlasting > conservatories; give me the privilege of making my own summer with my > own coals. > > http://gnufied.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.yeung at gearboxsoft.com Tue Dec 2 21:25:25 2008 From: william.yeung at gearboxsoft.com (Yeung William) Date: Wed, 3 Dec 2008 10:25:25 +0800 Subject: [Backgroundrb-devel] How to check the current enqueued task for a particular worker? In-Reply-To: References: Message-ID: <4F853228-11DC-4AC6-88A6-0C2272908B64@gearboxsoft.com> If thats the case how am I suppose to deal with it? I really need to find out the pending queue so I could allow my users to manage those pending tasks (like canceling them) On 3 Dec 2008, at 1:18 AM, hemant wrote: > On Tue, Dec 2, 2008 at 4:01 PM, Yeung William > wrote: >> I tried to check the API and found the method >> MetaWorker#check_for_enqueued_tasks, but how is that suppose to be >> invoked? >> can that be done with the worker proxy? > > No, usually thats an internal method, usually not exposed through the > MiddleMan proxy. From jnicholson at skarven.net Mon Dec 8 15:02:55 2008 From: jnicholson at skarven.net (Jim Nicholson) Date: Mon, 08 Dec 2008 15:02:55 -0500 Subject: [Backgroundrb-devel] Testing workers under Test::Unit Message-ID: <1228766575.22381.1.camel@jnick.skarven.net> The only example for a worker test in the current distribution appears to have been written using rspec. Is there an example of a worker test that uses Test::Unit::TestCase? My project hasn't moved to rspec yet. = Jim Nicholson From gethemant at gmail.com Tue Dec 9 07:10:32 2008 From: gethemant at gmail.com (hemant) Date: Tue, 9 Dec 2008 17:40:32 +0530 Subject: [Backgroundrb-devel] Testing workers under Test::Unit In-Reply-To: <1228766575.22381.1.camel@jnick.skarven.net> References: <1228766575.22381.1.camel@jnick.skarven.net> Message-ID: On Tue, Dec 9, 2008 at 1:32 AM, Jim Nicholson wrote: > The only example for a worker test in the current distribution appears > to have been written using rspec. Is there an example of a worker test > that uses Test::Unit::TestCase? My project hasn't moved to rspec yet. > Nooo, its test/spec and hence completely compatible with Test/Unit. Did you try porting same helper to a test/unit testcase? It should work. Also, we are using mocha. From akyrho at gmail.com Fri Dec 12 12:29:11 2008 From: akyrho at gmail.com (=?ISO-8859-1?Q?C=E9dric?=) Date: Fri, 12 Dec 2008 18:29:11 +0100 Subject: [Backgroundrb-devel] BackgroundRB on MacOS 10.5.5 Message-ID: <67b30a7b0812120929o1a0732ccwb8471e5fa8f9ffa9@mail.gmail.com> Hi everyone, I get into trouble while running backgroundrb on my MacBook (Mac OS 10.5.5) - svn version of backgroundrb - chronic (0.2.3) - packet (0.1.5) When I run script/backgroundrb, everything seems OK, but when i call a worker from IRB, i got this error : /Library/Ruby/Gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:279:in `load_missing_constant': uninitialized constant Packet::BinParser (NameError) from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:468:in `const_missing' from /Users/cedric/Documents/Aptana Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_worker.rb:165:in `post_init' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_connection.rb:21:in `invoke_init' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:302:in `decorate_handler' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:76:in `accept_connection' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:202:in `handle_external_messages' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:178:in `handle_read_event' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in `each' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in `handle_read_event' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:130:in `start_reactor' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in `loop' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in `start_reactor' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:21:in `run' from /Users/cedric/Documents/Aptana Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in `initialize' from script/backgroundrb:37:in `new' from script/backgroundrb:37 /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_worker.rb:46:in `handle_internal_messages' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:176:in `handle_read_event' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in `each' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in `handle_read_event' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:130:in `start_reactor' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in `loop' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in `start_reactor' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_worker.rb:20:in `start_worker' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:133:in `fork_and_load' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:96:in `load_workers' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:91:in `each' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:91:in `load_workers' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:20:in `run' from /Users/cedric/Documents/Aptana Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in `initialize' from script/backgroundrb:37:in `new' from script/backgroundrb:37 www:tweed cedric$ /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_worker.rb:46:in `handle_internal_messages' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:176:in `handle_read_event' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in `each' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in `handle_read_event' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:130:in `start_reactor' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in `loop' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in `start_reactor' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_worker.rb:20:in `start_worker' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:133:in `fork_and_load' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:108:in `start_worker' from /Users/cedric/Documents/Aptana Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:16:in `initialize' from /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:19:in `run' from /Users/cedric/Documents/Aptana Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in `initialize' from script/backgroundrb:37:in `new' from script/backgroundrb:37 I know this problem has already been raised but i can't have a fix with this. Let me know if more informations are needed. Any help would be appreciated. -- Bousmanne C?dric Jabber / XMPP : akyrho at gmail.com Mail : akyrho at gmail.com Blog : http://www.parenthese.be/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gethemant at gmail.com Fri Dec 12 13:44:20 2008 From: gethemant at gmail.com (hemant) Date: Sat, 13 Dec 2008 00:14:20 +0530 Subject: [Backgroundrb-devel] BackgroundRB on MacOS 10.5.5 In-Reply-To: <67b30a7b0812120929o1a0732ccwb8471e5fa8f9ffa9@mail.gmail.com> References: <67b30a7b0812120929o1a0732ccwb8471e5fa8f9ffa9@mail.gmail.com> Message-ID: I think, you need latest version of packet to go with latest svn version of backgroundrb. On Fri, Dec 12, 2008 at 10:59 PM, C?dric wrote: > Hi everyone, > > I get into trouble while running backgroundrb on my MacBook (Mac OS 10.5.5) > > - svn version of backgroundrb > - chronic (0.2.3) > - packet (0.1.5) > > When I run script/backgroundrb, everything seems OK, but when i call a > worker from IRB, i got this error : > > /Library/Ruby/Gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:279:in > `load_missing_constant': uninitialized constant Packet::BinParser > (NameError) > from > /Library/Ruby/Gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:468:in > `const_missing' > from /Users/cedric/Documents/Aptana > Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_worker.rb:165:in > `post_init' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_connection.rb:21:in > `invoke_init' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:302:in > `decorate_handler' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:76:in > `accept_connection' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:202:in > `handle_external_messages' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:178:in > `handle_read_event' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in > `each' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in > `handle_read_event' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:130:in > `start_reactor' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in > `loop' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in > `start_reactor' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:21:in > `run' > from /Users/cedric/Documents/Aptana > Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in > `initialize' > from script/backgroundrb:37:in `new' > from script/backgroundrb:37 > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_nbio.rb:25:in > `read_data': Packet::DisconnectError (Packet::DisconnectError) > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_worker.rb:46:in > `handle_internal_messages' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:176:in > `handle_read_event' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in > `each' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in > `handle_read_event' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:130:in > `start_reactor' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in > `loop' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in > `start_reactor' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_worker.rb:20:in > `start_worker' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:133:in > `fork_and_load' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:96:in > `load_workers' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:91:in > `each' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:91:in > `load_workers' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:20:in > `run' > from /Users/cedric/Documents/Aptana > Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in > `initialize' > from script/backgroundrb:37:in `new' > from script/backgroundrb:37 > www:tweed cedric$ > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_nbio.rb:25:in > `read_data': Packet::DisconnectError (Packet::DisconnectError) > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_worker.rb:46:in > `handle_internal_messages' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:176:in > `handle_read_event' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in > `each' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:174:in > `handle_read_event' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:130:in > `start_reactor' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in > `loop' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_core.rb:124:in > `start_reactor' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_worker.rb:20:in > `start_worker' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:133:in > `fork_and_load' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:108:in > `start_worker' > from /Users/cedric/Documents/Aptana > Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:16:in > `initialize' > from > /Users/cedric/.gem/ruby/1.8/gems/packet-0.1.5/lib/packet/packet_master.rb:19:in > `run' > from /Users/cedric/Documents/Aptana > Studio/tweed/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in > `initialize' > from script/backgroundrb:37:in `new' > from script/backgroundrb:37 > > I know this problem has already been raised but i can't have a fix with > this. Let me know if more informations are needed. > > Any help would be appreciated. > > > -- > Bousmanne C?dric > > Jabber / XMPP : akyrho at gmail.com > Mail : akyrho at gmail.com > Blog : http://www.parenthese.be/ > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org From knirirr at gmail.com Mon Dec 22 08:47:44 2008 From: knirirr at gmail.com (Milo Thurston) Date: Mon, 22 Dec 2008 13:47:44 +0000 Subject: [Backgroundrb-devel] backgroundrb won't start after upgrade Message-ID: <5b5714ce0812220547w23ffeeb7jdfb165dbecce8818@mail.gmail.com> Hello, I just upgraded BackgroundRb on a working Rails app by checking out the newest code from the git repository, deleting anything in the scripts directory left by the old version and running rake:backgroundb setup. It now appears to be horribly broken and the server won't start. For example: bonnacon% script/backgroundrb start [SNIP]/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_config.rb:6:in `parse_cmd_options': uninitialized constant BackgrounDRb::Config::OptionParser (NameError) from script/backgroundrb:15 Adding a "require 'optparse'" instruction to the code mentioned above leads to this error instead: bonnacon% script/backgroundrb start /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:493:in `const_missing': uninitialized constant BackgrounDRb::MasterProxy::BDRB_CONFIG (NameError) from /home/milo/Work/Web/cpdnresults/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:7:in `initialize' from script/backgroundrb:42:in `new' from script/backgroundrb:42 Is this an error with my Rails setup (2.2.2), or is there something wrong with BackgroundRb itself? Thanks, Milo. -- "One of the greatest delusions in the world is the hope that the evils in this world are to be cured by legislation." - Thomas B. Reed 1886 From pimea.mark at gmail.com Mon Dec 22 15:03:12 2008 From: pimea.mark at gmail.com (Mark Capodagli) Date: Mon, 22 Dec 2008 14:03:12 -0600 Subject: [Backgroundrb-devel] Cant stop backgroundrb server Message-ID: <5494C861-D2F4-4225-B216-33E9CBAE8FE6@gmail.com> I just got backgroundrb today and i set it up just fine. Then I tried running a test method with it to see if it worked. Well now I'm getting an infinite number of MySQL queries and I dont know why. They look like this SQL (0.000408) BEGIN BdrbJobQueue Load (0.002150) SELECT * FROM `bdrb_job_queues` WHERE ( worker_name = 'alerts_worker' AND taken = 0 AND scheduled_at <= '2008-12-22 19:47:24' ) LIMIT 1 FOR UPDATE SQL (0.000272) COMMIT SQL (0.000387) BEGIN BdrbJobQueue Load (0.001915) SELECT * FROM `bdrb_job_queues` WHERE ( worker_name = 'alerts_worker' AND taken = 0 AND scheduled_at <= '2008-12-22 19:47:29' ) LIMIT 1 FOR UPDATE SQL (0.000242) COMMIT it does this every 5 seconds. I typed script/backgroundrb stop and i get this error /Users/CRL00265/Documents/stratedirectory/vendor/plugins/backgroundrb/ lib/backgroundrb/bdrb_start_stop.rb:6:in `getpgid': No such process (Errno::ESRCH) from /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:6:in `kill_process' from /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:56:in `stop' from /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:56:in `each' from /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:56:in `stop' from script/backgroundrb:36 I changed my backgroundrb.yml file to point away from the server, I deleted the method it called, I restarted my server, nothing seems to stop the insanity. Can anyone give me a clue as to how I'm supposed to go about doing this? From william.yeung at gearboxsoft.com Mon Dec 22 22:07:23 2008 From: william.yeung at gearboxsoft.com (Yeung William) Date: Tue, 23 Dec 2008 11:07:23 +0800 Subject: [Backgroundrb-devel] Cant stop backgroundrb server In-Reply-To: <5494C861-D2F4-4225-B216-33E9CBAE8FE6@gmail.com> References: <5494C861-D2F4-4225-B216-33E9CBAE8FE6@gmail.com> Message-ID: <87576C77-FDC1-4F5C-87A1-7C2D74ED280D@gearboxsoft.com> Dear Mark, The loop is perfectly normal as its the way to look for the persistent job in your database so it could be scheduled and executed. The error I am not quite sure about- it seems can't find the pid. William Yeung On 23 Dec 2008, at 4:03 AM, Mark Capodagli wrote: > I just got backgroundrb today and i set it up just fine. Then I > tried running a test method with it to see if it worked. Well now > I'm getting an infinite number of MySQL queries and I dont know why. > They look like this > > SQL (0.000408) BEGIN > BdrbJobQueue Load (0.002150) SELECT * FROM `bdrb_job_queues` WHERE > ( worker_name = 'alerts_worker' AND taken = 0 AND scheduled_at <= > '2008-12-22 19:47:24' ) LIMIT 1 FOR UPDATE > SQL (0.000272) COMMIT > > SQL (0.000387) BEGIN > BdrbJobQueue Load (0.001915) SELECT * FROM `bdrb_job_queues` WHERE > ( worker_name = 'alerts_worker' AND taken = 0 AND scheduled_at <= > '2008-12-22 19:47:29' ) LIMIT 1 FOR UPDATE > SQL (0.000242) COMMIT > > it does this every 5 seconds. I typed script/backgroundrb stop and i > get this error > > /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ > backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:6:in `getpgid': No > such process (Errno::ESRCH) > from /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ > backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:6:in `kill_process' > from /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ > backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:56:in `stop' > from /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ > backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:56:in `each' > from /Users/CRL00265/Documents/stratedirectory/vendor/plugins/ > backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:56:in `stop' > from script/backgroundrb:36 > > I changed my backgroundrb.yml file to point away from the server, I > deleted the method it called, I restarted my server, nothing seems > to stop the insanity. Can anyone give me a clue as to how I'm > supposed to go about doing this? > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel From raghu.srinivasan at gmail.com Fri Dec 26 12:04:41 2008 From: raghu.srinivasan at gmail.com (Raghu Srinivasan) Date: Fri, 26 Dec 2008 09:04:41 -0800 Subject: [Backgroundrb-devel] 'stack level too deep' error Message-ID: <6482c06a0812260904s6797564csc81520ade7dbced5@mail.gmail.com> What might be causing this error? I see it once in 2-3 days and it goes away when I restart backgroundrb. Quoted below is my backgroundrb_server_11007.log file. Can I do anything to avoid this? Thanks, Raghu ================================================================================== /usr/lib/ruby/1.8/monitor.rb:224:in `mon_exit': stack level too deep (SystemStackError) from /usr/lib/ruby/1.8/monitor.rb:244:in `synchronize' from /usr/lib/ruby/1.8/logger.rb:496:in `write' from /usr/lib/ruby/1.8/logger.rb:326:in `add' from /usr/lib/ruby/1.8/logger.rb:374:in `info' from /home/raghus/public_html/ feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/log_worker.rb:17:in`process_request' from /home/raghus/public_html/ feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/log_worker.rb:10:in`receive_data' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:56:in `receive_internal_data' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_parser.rb:38:in `call' ... 13 levels... from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 from /usr/bin/packet_worker_runner:19:in `load' from /usr/bin/packet_worker_runner:19 /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:41:in `write_once': Packet::DisconnectError (Packet::DisconnectError) from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:52:in `write_and_schedule' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:16:in `each_with_index' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in `each' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in `each_with_index' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in `write_and_schedule' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:166:in `handle_write_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:163:in `each' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:163:in `handle_write_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:135:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:126:in `loop' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:126:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_master.rb:21:in `run' from /home/raghus/public_html/ feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/master_worker.rb:167:in`initialize' from ./script/backgroundrb:46:in `new' from ./script/backgroundrb:46 /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in `handle_internal_messages' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in `handle_read_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `each' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `handle_read_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `loop' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in `start_worker' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in `load_worker' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in `initialize' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 from /usr/bin/packet_worker_runner:19:in `load' from /usr/bin/packet_worker_runner:19 /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in `handle_internal_messages' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in `handle_read_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `each' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `handle_read_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `loop' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in `start_worker' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in `load_worker' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in `initialize' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 from /usr/bin/packet_worker_runner:19:in `load' from /usr/bin/packet_worker_runner:19 /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in `handle_internal_messages' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in `handle_read_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `each' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `handle_read_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `loop' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in `start_worker' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in `load_worker' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in `initialize' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 from /usr/bin/packet_worker_runner:19:in `load' from /usr/bin/packet_worker_runner:19 /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in `handle_internal_messages' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in `handle_read_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `each' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `handle_read_event' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `loop' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `start_reactor' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in `start_worker' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in `load_worker' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in `initialize' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 from /usr/bin/packet_worker_runner:19:in `load' from /usr/bin/packet_worker_runner:19 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gethemant at gmail.com Fri Dec 26 12:36:36 2008 From: gethemant at gmail.com (hemant kumar) Date: Fri, 26 Dec 2008 23:06:36 +0530 Subject: [Backgroundrb-devel] 'stack level too deep' error In-Reply-To: <6482c06a0812260904s6797564csc81520ade7dbced5@mail.gmail.com> References: <6482c06a0812260904s6797564csc81520ade7dbced5@mail.gmail.com> Message-ID: <1230312996.11766.1.camel@shire> Yes, this has been fixed long back in recent versions of Packet library. The problem is, the protocol parser used in 0.1.6 is recursive and throws StackLevel too deep errors. Recent versions come with iterative parser and hence do not have this problem. On Fri, 2008-12-26 at 09:04 -0800, Raghu Srinivasan wrote: > What might be causing this error? I see it once in 2-3 days and it > goes away when I restart backgroundrb. Quoted below is > my backgroundrb_server_11007.log file. Can I do anything to avoid > this? > Thanks, > Raghu > > ================================================================================== > /usr/lib/ruby/1.8/monitor.rb:224:in `mon_exit': stack level too deep > (SystemStackError) > from /usr/lib/ruby/1.8/monitor.rb:244:in `synchronize' > from /usr/lib/ruby/1.8/logger.rb:496:in `write' > from /usr/lib/ruby/1.8/logger.rb:326:in `add' > from /usr/lib/ruby/1.8/logger.rb:374:in `info' > > from /home/raghus/public_html/feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/log_worker.rb:17:in `process_request' > > from /home/raghus/public_html/feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/log_worker.rb:10:in `receive_data' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:56:in `receive_internal_data' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_parser.rb:38:in `call' > ... 13 levels... > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > from /usr/bin/packet_worker_runner:19:in `load' > from /usr/bin/packet_worker_runner:19 > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:41:in `write_once': Packet::DisconnectError (Packet::DisconnectError) > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:52:in `write_and_schedule' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:16:in `each_with_index' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in `each' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in `each_with_index' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in `write_and_schedule' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:166:in `handle_write_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:163:in `each' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:163:in `handle_write_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:135:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:126:in `loop' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:126:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_master.rb:21:in `run' > > from /home/raghus/public_html/feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/master_worker.rb:167:in `initialize' > from ./script/backgroundrb:46:in `new' > from ./script/backgroundrb:46 > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in `handle_internal_messages' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in `handle_read_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `each' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `handle_read_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `loop' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in `start_worker' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in `load_worker' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in `initialize' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > from /usr/bin/packet_worker_runner:19:in `load' > from /usr/bin/packet_worker_runner:19 > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in `handle_internal_messages' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in `handle_read_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `each' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `handle_read_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `loop' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in `start_worker' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in `load_worker' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in `initialize' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > from /usr/bin/packet_worker_runner:19:in `load' > from /usr/bin/packet_worker_runner:19 > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in `handle_internal_messages' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in `handle_read_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `each' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `handle_read_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `loop' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in `start_worker' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in `load_worker' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in `initialize' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > from /usr/bin/packet_worker_runner:19:in `load' > from /usr/bin/packet_worker_runner:19 > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in `read_data': Packet::DisconnectError (Packet::DisconnectError) > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in `handle_internal_messages' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in `handle_read_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `each' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in `handle_read_event' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `loop' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in `start_reactor' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in `start_worker' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in `load_worker' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in `initialize' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in `new' > > from /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > from /usr/bin/packet_worker_runner:19:in `load' > from /usr/bin/packet_worker_runner:19 > > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel From csgyuricza at gmail.com Fri Dec 26 13:10:40 2008 From: csgyuricza at gmail.com (Csongor Gyuricza) Date: Fri, 26 Dec 2008 10:10:40 -0800 Subject: [Backgroundrb-devel] Could we move this list to Google groups? Message-ID: Hemant, I really like being part of this distribution list but I would like to be able to make adjustments to the email delivery. Have you ever considered moving this list to Google groups? Just a thought. Happy Holidays to all backgroundrb users! Csongor -------------- next part -------------- An HTML attachment was scrubbed... URL: From raghu.srinivasan at gmail.com Fri Dec 26 13:21:39 2008 From: raghu.srinivasan at gmail.com (Raghu Srinivasan) Date: Fri, 26 Dec 2008 10:21:39 -0800 Subject: [Backgroundrb-devel] 'stack level too deep' error In-Reply-To: <1230312996.11766.1.camel@shire> References: <6482c06a0812260904s6797564csc81520ade7dbced5@mail.gmail.com> <1230312996.11766.1.camel@shire> Message-ID: <6482c06a0812261021ib8107e9g2501e8667654859@mail.gmail.com> The latest version of Packet seems to be 0.1.14. Can I just upgrade the packet gem and be done with it or are there any dependencies with Backgroundrb and chronic etc? Appreciate your quick response, Hemant. Raghu On Fri, Dec 26, 2008 at 9:36 AM, hemant kumar wrote: > Yes, this has been fixed long back in recent versions of Packet library. > The problem is, the protocol parser used in 0.1.6 is recursive and > throws StackLevel too deep errors. Recent versions come with iterative > parser and hence do not have this problem. > > > > On Fri, 2008-12-26 at 09:04 -0800, Raghu Srinivasan wrote: > > What might be causing this error? I see it once in 2-3 days and it > > goes away when I restart backgroundrb. Quoted below is > > my backgroundrb_server_11007.log file. Can I do anything to avoid > > this? > > Thanks, > > Raghu > > > > > ================================================================================== > > /usr/lib/ruby/1.8/monitor.rb:224:in `mon_exit': stack level too deep > > (SystemStackError) > > from /usr/lib/ruby/1.8/monitor.rb:244:in `synchronize' > > from /usr/lib/ruby/1.8/logger.rb:496:in `write' > > from /usr/lib/ruby/1.8/logger.rb:326:in `add' > > from /usr/lib/ruby/1.8/logger.rb:374:in `info' > > > > from /home/raghus/public_html/ > feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/log_worker.rb:17:in`process_request' > > > > from /home/raghus/public_html/ > feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/log_worker.rb:10:in`receive_data' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:56:in > `receive_internal_data' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_parser.rb:38:in > `call' > > ... 13 levels... > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in > `new' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > > from /usr/bin/packet_worker_runner:19:in `load' > > from /usr/bin/packet_worker_runner:19 > > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:41:in > `write_once': Packet::DisconnectError (Packet::DisconnectError) > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:52:in > `write_and_schedule' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:16:in > `each_with_index' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in > `each' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in > `each_with_index' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_nbio.rb:51:in > `write_and_schedule' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:166:in > `handle_write_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:163:in > `each' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:163:in > `handle_write_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:135:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:126:in > `loop' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_core.rb:126:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/lib/packet/packet_master.rb:21:in > `run' > > > > from /home/raghus/public_html/ > feedflix.com/ff/vendor/plugins/backgroundrb/server/lib/master_worker.rb:167:in`initialize' > > from ./script/backgroundrb:46:in `new' > > from ./script/backgroundrb:46 > > > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in > `read_data': Packet::DisconnectError (Packet::DisconnectError) > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in > `handle_internal_messages' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in > `handle_read_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in > `each' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in > `handle_read_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in > `loop' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in > `start_worker' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in > `load_worker' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in > `initialize' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in > `new' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > > from /usr/bin/packet_worker_runner:19:in `load' > > from /usr/bin/packet_worker_runner:19 > > > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in > `read_data': Packet::DisconnectError (Packet::DisconnectError) > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in > `handle_internal_messages' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in > `handle_read_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in > `each' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in > `handle_read_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in > `loop' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in > `start_worker' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in > `load_worker' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in > `initialize' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in > `new' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > > from /usr/bin/packet_worker_runner:19:in `load' > > from /usr/bin/packet_worker_runner:19 > > > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in > `read_data': Packet::DisconnectError (Packet::DisconnectError) > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in > `handle_internal_messages' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in > `handle_read_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in > `each' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in > `handle_read_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in > `loop' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in > `start_worker' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in > `load_worker' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in > `initialize' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in > `new' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > > from /usr/bin/packet_worker_runner:19:in `load' > > from /usr/bin/packet_worker_runner:19 > > > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_nbio.rb:25:in > `read_data': Packet::DisconnectError (Packet::DisconnectError) > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:49:in > `handle_internal_messages' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:179:in > `handle_read_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in > `each' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:177:in > `handle_read_event' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:133:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in > `loop' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_core.rb:126:in > `start_reactor' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/../lib/packet/packet_worker.rb:21:in > `start_worker' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:33:in > `load_worker' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:26:in > `initialize' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47:in > `new' > > > > from > /usr/lib/ruby/gems/1.8/gems/packet-0.1.6/bin/packet_worker_runner:47 > > from /usr/bin/packet_worker_runner:19:in `load' > > from /usr/bin/packet_worker_runner:19 > > > > > > _______________________________________________ > > Backgroundrb-devel mailing list > > Backgroundrb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gethemant at gmail.com Fri Dec 26 13:58:20 2008 From: gethemant at gmail.com (hemant) Date: Sat, 27 Dec 2008 00:28:20 +0530 Subject: [Backgroundrb-devel] 'stack level too deep' error In-Reply-To: <6482c06a0812261021ib8107e9g2501e8667654859@mail.gmail.com> References: <6482c06a0812260904s6797564csc81520ade7dbced5@mail.gmail.com> <1230312996.11766.1.camel@shire> <6482c06a0812261021ib8107e9g2501e8667654859@mail.gmail.com> Message-ID: On Fri, Dec 26, 2008 at 11:51 PM, Raghu Srinivasan wrote: > The latest version of Packet seems to be 0.1.14. Can I just upgrade the > packet gem and be done with it or are there any dependencies with > Backgroundrb and chronic etc? > Appreciate your quick response, Hemant. Well, yes 0.1.14 version of Packet is only compatible with github master of BackgrounDRb (or svn trunk will do as well). I am well aware of your previous problems while upgrading to latest version. May be, you can start a brand new rails project install the dependencies and it give it a shot and see if it works. If it doesn't send me your sample project in a tar.gz and I will see what has gone wrong. But yes, there are API changes in latest version of bdrb (but its a lot more stable) From gethemant at gmail.com Fri Dec 26 14:00:34 2008 From: gethemant at gmail.com (hemant) Date: Sat, 27 Dec 2008 00:30:34 +0530 Subject: [Backgroundrb-devel] Could we move this list to Google groups? In-Reply-To: References: Message-ID: On Fri, Dec 26, 2008 at 11:40 PM, Csongor Gyuricza wrote: > Hemant, > > I really like being part of this distribution list but I would like to be > able to make adjustments to the email delivery. Have you ever considered > moving this list to Google groups? Just a thought. > > Happy Holidays to all backgroundrb users! Csongor, I haven't considered moving to google groups and I have nothing against the idea. If folks have no problems, so be it. From gethemant at gmail.com Fri Dec 26 14:04:20 2008 From: gethemant at gmail.com (hemant) Date: Sat, 27 Dec 2008 00:34:20 +0530 Subject: [Backgroundrb-devel] 'stack level too deep' error In-Reply-To: References: <6482c06a0812260904s6797564csc81520ade7dbced5@mail.gmail.com> <1230312996.11766.1.camel@shire> <6482c06a0812261021ib8107e9g2501e8667654859@mail.gmail.com> Message-ID: On Sat, Dec 27, 2008 at 12:28 AM, hemant wrote: > On Fri, Dec 26, 2008 at 11:51 PM, Raghu Srinivasan > wrote: >> The latest version of Packet seems to be 0.1.14. Can I just upgrade the >> packet gem and be done with it or are there any dependencies with >> Backgroundrb and chronic etc? > Or if you are _really_ stuck with the version of bdrb and packet, you can take packet_parser.rb file from latest gem of packet and replace it with BinParser file in old packet distribution. Just watchout for module/namespaces and you should be good to go. From raghu.srinivasan at gmail.com Sun Dec 28 02:58:54 2008 From: raghu.srinivasan at gmail.com (Raghu Srinivasan) Date: Sat, 27 Dec 2008 23:58:54 -0800 Subject: [Backgroundrb-devel] Error while connecting to the backgroundrb server Message-ID: <6482c06a0812272358v5c3a47bdo3f90e2b40af772fc@mail.gmail.com> Intermittently, I see this error about an error connecting to the backgroundrb server. This happens when, in a loop, I submit dozens, sometimes a few hundred jobs in the B/G. Any idea why this happens and how to avoid it? Raghu -------------------------------------------------------------------------------------------------------------------------------------- BackgrounDRb::BdrbConnError (Error while connecting to the backgroundrb server): /vendor/plugins/backgroundrb/lib/backgroundrb.rb:94:in `dump_object' /vendor/plugins/backgroundrb/lib/backgroundrb.rb:110:in `ask_work' /vendor/plugins/backgroundrb/lib/backgroundrb/rails_worker_proxy.rb:28:in `method_missing' /app/controllers/logins_controller.rb:60:in `batch_refresh' /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/inflector.rb:257:in `each_with_index' /app/controllers/logins_controller.rb:56:in `each' /app/controllers/logins_controller.rb:56:in `each_with_index' /app/controllers/logins_controller.rb:56:in `batch_refresh' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action_without_newrelic_trace' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action_without_newrelic_trace' /vendor/plugins/newrelic_rpm/lib/newrelic/agent/instrumentation/action_controller.rb:63:in `perform_action' /vendor/plugins/newrelic_rpm/lib/newrelic/agent/method_tracer.rb:38:in `trace_method_execution' /vendor/plugins/newrelic_rpm/lib/newrelic/agent/instrumentation/action_controller.rb:52:in `perform_action' /vendor/plugins/newrelic_rpm/lib/newrelic/agent/method_tracer.rb:38:in `trace_method_execution' /vendor/plugins/newrelic_rpm/lib/newrelic/agent/instrumentation/action_controller.rb:46:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch_without_newrelic' /vendor/plugins/newrelic_rpm/lib/newrelic/agent/instrumentation/dispatcher.rb:41:in `dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:76:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `synchronize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:159:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:282:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19:in `load' /usr/bin/mongrel_rails:19 -------------- next part -------------- An HTML attachment was scrubbed... URL: From raghu.srinivasan at gmail.com Sun Dec 28 03:36:24 2008 From: raghu.srinivasan at gmail.com (Raghu Srinivasan) Date: Sun, 28 Dec 2008 00:36:24 -0800 Subject: [Backgroundrb-devel] Could we move this list to Google groups? In-Reply-To: References: Message-ID: <6482c06a0812280036v509e34a2j66682a4f6efb7e9b@mail.gmail.com> Hemant - I think moving this to a Google Group would be great. In addition to email delivery preferences, searching would also be so much faster. Here's a quick survey link: http://spreadsheets.google.com/viewform?key=pWYlEcaCC04AqQApfzbtLCw and here's the public link to view the results: http://spreadsheets.google.com/pub?key=pWYlEcaCC04AqQApfzbtLCw Perhaps you could give the folks on this list a week or two to respond and if most people vote 'Yes', move it over. Raghu On Fri, Dec 26, 2008 at 11:00 AM, hemant wrote: > On Fri, Dec 26, 2008 at 11:40 PM, Csongor Gyuricza > wrote: > > Hemant, > > > > I really like being part of this distribution list but I would like to be > > able to make adjustments to the email delivery. Have you ever considered > > moving this list to Google groups? Just a thought. > > > > Happy Holidays to all backgroundrb users! > > Csongor, > > I haven't considered moving to google groups and I have nothing > against the idea. If folks have no problems, so be it. > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csgyuricza at gmail.com Sun Dec 28 16:09:47 2008 From: csgyuricza at gmail.com (Csongor Gyuricza) Date: Sun, 28 Dec 2008 13:09:47 -0800 Subject: [Backgroundrb-devel] Could we move this list to Google groups? In-Reply-To: <6482c06a0812280036v509e34a2j66682a4f6efb7e9b@mail.gmail.com> References: <6482c06a0812280036v509e34a2j66682a4f6efb7e9b@mail.gmail.com> Message-ID: Hi Hemant, Since you are the center piece of backgroundrb I assume you want to create the Google group. Let me know otherwise if you would like me to start it. Csongor On Sun, Dec 28, 2008 at 12:36 AM, Raghu Srinivasan < raghu.srinivasan at gmail.com> wrote: > Hemant - I think moving this to a Google Group would be great. In addition > to email delivery preferences, searching would also be so much faster. Here's > a quick survey link: > http://spreadsheets.google.com/viewform?key=pWYlEcaCC04AqQApfzbtLCw > and here's the public link to view the results: > http://spreadsheets.google.com/pub?key=pWYlEcaCC04AqQApfzbtLCw > > Perhaps you could give the folks on this list a week or two to respond and > if most people vote 'Yes', move it over. > > Raghu > > On Fri, Dec 26, 2008 at 11:00 AM, hemant wrote: > >> On Fri, Dec 26, 2008 at 11:40 PM, Csongor Gyuricza >> wrote: >> > Hemant, >> > >> > I really like being part of this distribution list but I would like to >> be >> > able to make adjustments to the email delivery. Have you ever considered >> > moving this list to Google groups? Just a thought. >> > >> > Happy Holidays to all backgroundrb users! >> >> Csongor, >> >> I haven't considered moving to google groups and I have nothing >> against the idea. If folks have no problems, so be it. >> _______________________________________________ >> Backgroundrb-devel mailing list >> Backgroundrb-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/backgroundrb-devel >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gethemant at gmail.com Sun Dec 28 17:10:06 2008 From: gethemant at gmail.com (hemant) Date: Mon, 29 Dec 2008 03:40:06 +0530 Subject: [Backgroundrb-devel] Could we move this list to Google groups? In-Reply-To: References: <6482c06a0812280036v509e34a2j66682a4f6efb7e9b@mail.gmail.com> Message-ID: On Mon, Dec 29, 2008 at 2:39 AM, Csongor Gyuricza wrote: > Hi Hemant, > > Since you are the center piece of backgroundrb I assume you want to create > the Google group. Let me know otherwise if you would like me to start it. Yup, Go ahead and create a group. But we need to add all the existing members to this new group. I will try to get the list from Ezra. From synfinatic at gmail.com Mon Dec 29 19:52:43 2008 From: synfinatic at gmail.com (Aaron Turner) Date: Mon, 29 Dec 2008 16:52:43 -0800 Subject: [Backgroundrb-devel] running multiple backgroundrb's Message-ID: <1ca1c1410812291652o21560e8sea0a3025d7caab84@mail.gmail.com> So I have a single server for two different instances of the same rails app, each with their own environment / source tree. Anyways, long story short, I need to run two copies of backgroundrb on different ports (one for each environment). Ideally, I'd like to just have two entries in the backgroundrb.yml file (just like the Rails database.yml file) but this isn't very clear from the docs. Is there a simple way to do this which doesn't require different versions of the backgroundrb.yml file? Thanks, Aaron -- Aaron Turner http://synfin.net/ http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin From jeffrey.schoolcraft at gmail.com Wed Dec 31 09:19:06 2008 From: jeffrey.schoolcraft at gmail.com (Jeff Schoolcraft) Date: Wed, 31 Dec 2008 09:19:06 -0500 Subject: [Backgroundrb-devel] I need help getting my god config cleaned up and running in production Message-ID: <55e1a7fa0812310619u664c41f8j32f1050cc617626b@mail.gmail.com> I'm moving a running app from slicehost to linode and have been trying to get backgroundrb up and running. My current stumbling block is with my god config: http://gist.github.com/41746 When I start it up it's looking for the development database instead of production. gnufied figured out that it was my database.yml not having a development stanza. It probably still could use cleaning up, if you have any suggestions, I'd be greatful. Thanks, Jeff -- Jeff Schoolcraft http://thequeue.net/blog/ Microsoft MVP -------------- next part -------------- An HTML attachment was scrubbed... URL: From raghu.srinivasan at gmail.com Wed Dec 31 12:15:49 2008 From: raghu.srinivasan at gmail.com (Raghu Srinivasan) Date: Wed, 31 Dec 2008 09:15:49 -0800 Subject: [Backgroundrb-devel] Need help with understanding how thread_pool/pool_size work Message-ID: <6482c06a0812310915l33ab2f48veacf67a08446ebe6@mail.gmail.com> I'm on BDRB v 1.0.3 and am trying to understand how thread_pool and pool_size work. I have to kick of dozens of jobs on schedule (each hour or so). Other than the fact that they're all accessing the same DB there's no reason for them to not run in parallel. thread_pool/pool_size should be the way to go right? I've put in sample code with its results below: My Rails controller kicks off 5 jobs in a loop - each calling the run_concurrent method in my foo worker. run_concurrent then calls my_actual_method which just logger.infos a message with a time stamp and sleeps for 5 seconds to simulate a long running job. I did this as per http://backgroundrb.rubyforge.org/workers/#thread_pool Since I'm calling this via a defer and have a pool size of 10, I expect to see that my_actual_method actually gets called 5 times in quick succession (since the pool size is greater than the # of calls). However I find that run_concurrent doesn't even call my_actual_method. Here's the output from my backgroundrb log when I go to http://mysite.com/some/foobar Can someone help me understand what I'm doing wrong here? Thanks, Raghu ==================================================== Rails controller code class SomeController < ApplicationController def foobar i = 0 while i < 5 worker = MiddleMan.worker(:foo_worker) result = worker.run_concurrent(:job_key => random_string(10)) i += 1 end render :text => 'all done at ' + Time.now.to_s end end ==================================================== Worker code class FooWorker < BackgrounDRb::MetaWorker set_worker_name :foo_worker pool_size 10 def create # this method is called, when worker is loaded for the first time end def run_concurrent(args) logger.info "*** FOO_WORKER/RUN_CONCURRENT at " + Time.now.to_s thread_pool.defer(:my_actual_method) end def my_actual_method(args) logger.info "*** FOO_WORKER/MY_ACTUAL_METHOD at " + Time.now.to_s sleep 5 end end ==================================================== Here's the output # Logfile created on Wed Dec 31 09:15:21 +0000 2008 by / foo_worker started (pid:5087) Schedules for worker loaded (pid:5087) run_concurrent job_keydfvq5o4m0s (pid:5087) *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) run_concurrent job_keyy4tascam6k (pid:5087) *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) run_concurrent job_key8gw2eegeqs (pid:5087) *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) run_concurrent job_keyywb1oop73t (pid:5087) *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) run_concurrent job_key17gfkqtzjh (pid:5087) *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) ==================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From gethemant at gmail.com Wed Dec 31 16:45:52 2008 From: gethemant at gmail.com (hemant) Date: Thu, 1 Jan 2009 03:15:52 +0530 Subject: [Backgroundrb-devel] I need help getting my god config cleaned up and running in production In-Reply-To: <55e1a7fa0812310619u664c41f8j32f1050cc617626b@mail.gmail.com> References: <55e1a7fa0812310619u664c41f8j32f1050cc617626b@mail.gmail.com> Message-ID: I hope the IRC discussion we had solved the problem currently. On Wed, Dec 31, 2008 at 7:49 PM, Jeff Schoolcraft wrote: > I'm moving a running app from slicehost to linode and have been trying to > get backgroundrb up and running. My current stumbling block is with my god > config: http://gist.github.com/41746 > When I start it up it's looking for the development database instead of > production. > gnufied figured out that it was my database.yml not having a development > stanza. > It probably still could use cleaning up, if you have any suggestions, I'd be > greatful. > Thanks, > Jeff > > -- > Jeff Schoolcraft > http://thequeue.net/blog/ > Microsoft MVP > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org From gethemant at gmail.com Wed Dec 31 16:48:43 2008 From: gethemant at gmail.com (hemant) Date: Thu, 1 Jan 2009 03:18:43 +0530 Subject: [Backgroundrb-devel] Need help with understanding how thread_pool/pool_size work In-Reply-To: <6482c06a0812310915l33ab2f48veacf67a08446ebe6@mail.gmail.com> References: <6482c06a0812310915l33ab2f48veacf67a08446ebe6@mail.gmail.com> Message-ID: Could it be, because method that runs in thread expects an argument and you are not passing that argument when using thread_pool.defer() ?? Did you not get any errors in log file? On Wed, Dec 31, 2008 at 10:45 PM, Raghu Srinivasan wrote: > I'm on BDRB v 1.0.3 and am trying to understand how thread_pool and > pool_size work. I have to kick of dozens of jobs on schedule (each hour or > so). Other than the fact that they're all accessing the same DB there's no > reason for them to not run in parallel. thread_pool/pool_size should be the > way to go right? > I've put in sample code with its results below: > My Rails controller kicks off 5 jobs in a loop - each calling the > run_concurrent method in my foo worker. run_concurrent then calls > my_actual_method which just logger.infos a message with a time stamp and > sleeps for 5 seconds to simulate a long running job. I did this as > per http://backgroundrb.rubyforge.org/workers/#thread_pool Since I'm calling > this via a defer and have a pool size of 10, I expect to see that > my_actual_method actually gets called 5 times in quick succession (since the > pool size is greater than the # of calls). However I find that > run_concurrent doesn't even call my_actual_method. Here's the output from my > backgroundrb log when I go to http://mysite.com/some/foobar > Can someone help me understand what I'm doing wrong here? > Thanks, > Raghu > ==================================================== > Rails controller code > class SomeController < ApplicationController > def foobar > i = 0 > while i < 5 > worker = MiddleMan.worker(:foo_worker) > result = worker.run_concurrent(:job_key => > random_string(10)) > i += 1 > end > render :text => 'all done at ' + Time.now.to_s > end > end > ==================================================== > Worker code > class FooWorker < BackgrounDRb::MetaWorker > set_worker_name :foo_worker > pool_size 10 > def create > # this method is called, when worker is loaded for the first > time > end > def run_concurrent(args) > logger.info "*** FOO_WORKER/RUN_CONCURRENT at " + > Time.now.to_s > thread_pool.defer(:my_actual_method) > end > def my_actual_method(args) > logger.info "*** FOO_WORKER/MY_ACTUAL_METHOD at " + > Time.now.to_s > sleep 5 > end > end > ==================================================== > Here's the output > # Logfile created on Wed Dec 31 09:15:21 +0000 2008 by / > foo_worker started (pid:5087) > Schedules for worker loaded (pid:5087) > run_concurrent job_keydfvq5o4m0s (pid:5087) > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) > run_concurrent job_keyy4tascam6k (pid:5087) > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) > run_concurrent job_key8gw2eegeqs (pid:5087) > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) > run_concurrent job_keyywb1oop73t (pid:5087) > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) > run_concurrent job_key17gfkqtzjh (pid:5087) > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 (pid:5087) > ==================================================== > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org From raghu.srinivasan at gmail.com Wed Dec 31 17:43:35 2008 From: raghu.srinivasan at gmail.com (Raghu Srinivasan) Date: Wed, 31 Dec 2008 14:43:35 -0800 Subject: [Backgroundrb-devel] Need help with understanding how thread_pool/pool_size work In-Reply-To: References: <6482c06a0812310915l33ab2f48veacf67a08446ebe6@mail.gmail.com> Message-ID: <6482c06a0812311443t6c4eccfbs9c1e20f2f03ac4c5@mail.gmail.com> No, I don't get any errors at all. Why is it mandatory for the method that I want to run concurrently to receive an argument? In the real case of course I'll be passing some equivalent of an ID but let me try with that and see... On Wed, Dec 31, 2008 at 1:48 PM, hemant wrote: > Could it be, because method that runs in thread expects an argument > and you are not passing that argument when using thread_pool.defer() > ?? > > Did you not get any errors in log file? > > > > On Wed, Dec 31, 2008 at 10:45 PM, Raghu Srinivasan > wrote: > > I'm on BDRB v 1.0.3 and am trying to understand how thread_pool and > > pool_size work. I have to kick of dozens of jobs on schedule (each hour > or > > so). Other than the fact that they're all accessing the same DB there's > no > > reason for them to not run in parallel. thread_pool/pool_size should be > the > > way to go right? > > I've put in sample code with its results below: > > My Rails controller kicks off 5 jobs in a loop - each calling the > > run_concurrent method in my foo worker. run_concurrent then calls > > my_actual_method which just logger.infos a message with a time stamp and > > sleeps for 5 seconds to simulate a long running job. I did this as > > per http://backgroundrb.rubyforge.org/workers/#thread_pool Since I'm > calling > > this via a defer and have a pool size of 10, I expect to see that > > my_actual_method actually gets called 5 times in quick succession (since > the > > pool size is greater than the # of calls). However I find that > > run_concurrent doesn't even call my_actual_method. Here's the output from > my > > backgroundrb log when I go to http://mysite.com/some/foobar > > Can someone help me understand what I'm doing wrong here? > > Thanks, > > Raghu > > ==================================================== > > Rails controller code > > class SomeController < ApplicationController > > def foobar > > i = 0 > > while i < 5 > > worker = MiddleMan.worker(:foo_worker) > > result = worker.run_concurrent(:job_key => > > random_string(10)) > > i += 1 > > end > > render :text => 'all done at ' + Time.now.to_s > > end > > end > > ==================================================== > > Worker code > > class FooWorker < BackgrounDRb::MetaWorker > > set_worker_name :foo_worker > > pool_size 10 > > def create > > # this method is called, when worker is loaded for the > first > > time > > end > > def run_concurrent(args) > > logger.info "*** FOO_WORKER/RUN_CONCURRENT at " + > > Time.now.to_s > > thread_pool.defer(:my_actual_method) > > end > > def my_actual_method(args) > > logger.info "*** FOO_WORKER/MY_ACTUAL_METHOD at " + > > Time.now.to_s > > sleep 5 > > end > > end > > ==================================================== > > Here's the output > > # Logfile created on Wed Dec 31 09:15:21 +0000 2008 by / > > foo_worker started (pid:5087) > > Schedules for worker loaded (pid:5087) > > run_concurrent job_keydfvq5o4m0s (pid:5087) > > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 > (pid:5087) > > run_concurrent job_keyy4tascam6k (pid:5087) > > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 > (pid:5087) > > run_concurrent job_key8gw2eegeqs (pid:5087) > > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 > (pid:5087) > > run_concurrent job_keyywb1oop73t (pid:5087) > > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 > (pid:5087) > > run_concurrent job_key17gfkqtzjh (pid:5087) > > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 > (pid:5087) > > ==================================================== > > > > _______________________________________________ > > Backgroundrb-devel mailing list > > Backgroundrb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > > > > > -- > Let them talk of their oriental summer climes of everlasting > conservatories; give me the privilege of making my own summer with my > own coals. > > http://gnufied.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raghu.srinivasan at gmail.com Wed Dec 31 18:00:25 2008 From: raghu.srinivasan at gmail.com (Raghu Srinivasan) Date: Wed, 31 Dec 2008 15:00:25 -0800 Subject: [Backgroundrb-devel] Need help with understanding how thread_pool/pool_size work In-Reply-To: <6482c06a0812311443t6c4eccfbs9c1e20f2f03ac4c5@mail.gmail.com> References: <6482c06a0812310915l33ab2f48veacf67a08446ebe6@mail.gmail.com> <6482c06a0812311443t6c4eccfbs9c1e20f2f03ac4c5@mail.gmail.com> Message-ID: <6482c06a0812311500n142993eagf5dbeecd57a9fc38@mail.gmail.com> No luck Hemant. I changed my worker as follows, no error, I get the exact same o/p as before. Where might I be messing up?Thanks! Raghu ============================ class FooWorker < BackgrounDRb::MetaWorker set_worker_name :foo_worker pool_size 10 def create # this method is called, when worker is loaded for the first time end def run_concurrent(args) logger.info "*** FOO_WORKER/RUN_CONCURRENT at " + Time.now.to_s thread_pool.defer(:my_actual_method,:x => args[:job_key]) end def my_actual_method(args) logger.info "*** FOO_WORKER/MY_ACTUAL_METHOD " + args[:x] + " at " + Time.now.to_s sleep 5 end end ============================ On Wed, Dec 31, 2008 at 2:43 PM, Raghu Srinivasan < raghu.srinivasan at gmail.com> wrote: > No, I don't get any errors at all. Why is it mandatory for the method that > I want to run concurrently to receive an argument? In the real case of > course I'll be passing some equivalent of an ID but let me try with that and > see... > > > On Wed, Dec 31, 2008 at 1:48 PM, hemant wrote: > >> Could it be, because method that runs in thread expects an argument >> and you are not passing that argument when using thread_pool.defer() >> ?? >> >> Did you not get any errors in log file? >> >> >> >> On Wed, Dec 31, 2008 at 10:45 PM, Raghu Srinivasan >> wrote: >> > I'm on BDRB v 1.0.3 and am trying to understand how thread_pool and >> > pool_size work. I have to kick of dozens of jobs on schedule (each hour >> or >> > so). Other than the fact that they're all accessing the same DB there's >> no >> > reason for them to not run in parallel. thread_pool/pool_size should be >> the >> > way to go right? >> > I've put in sample code with its results below: >> > My Rails controller kicks off 5 jobs in a loop - each calling the >> > run_concurrent method in my foo worker. run_concurrent then calls >> > my_actual_method which just logger.infos a message with a time stamp and >> > sleeps for 5 seconds to simulate a long running job. I did this as >> > per http://backgroundrb.rubyforge.org/workers/#thread_pool Since I'm >> calling >> > this via a defer and have a pool size of 10, I expect to see that >> > my_actual_method actually gets called 5 times in quick succession (since >> the >> > pool size is greater than the # of calls). However I find that >> > run_concurrent doesn't even call my_actual_method. Here's the output >> from my >> > backgroundrb log when I go to http://mysite.com/some/foobar >> > Can someone help me understand what I'm doing wrong here? >> > Thanks, >> > Raghu >> > ==================================================== >> > Rails controller code >> > class SomeController < ApplicationController >> > def foobar >> > i = 0 >> > while i < 5 >> > worker = MiddleMan.worker(:foo_worker) >> > result = worker.run_concurrent(:job_key => >> > random_string(10)) >> > i += 1 >> > end >> > render :text => 'all done at ' + Time.now.to_s >> > end >> > end >> > ==================================================== >> > Worker code >> > class FooWorker < BackgrounDRb::MetaWorker >> > set_worker_name :foo_worker >> > pool_size 10 >> > def create >> > # this method is called, when worker is loaded for the >> first >> > time >> > end >> > def run_concurrent(args) >> > logger.info "*** FOO_WORKER/RUN_CONCURRENT at " + >> > Time.now.to_s >> > thread_pool.defer(:my_actual_method) >> > end >> > def my_actual_method(args) >> > logger.info "*** FOO_WORKER/MY_ACTUAL_METHOD at " + >> > Time.now.to_s >> > sleep 5 >> > end >> > end >> > ==================================================== >> > Here's the output >> > # Logfile created on Wed Dec 31 09:15:21 +0000 2008 by / >> > foo_worker started (pid:5087) >> > Schedules for worker loaded (pid:5087) >> > run_concurrent job_keydfvq5o4m0s (pid:5087) >> > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 >> (pid:5087) >> > run_concurrent job_keyy4tascam6k (pid:5087) >> > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 >> (pid:5087) >> > run_concurrent job_key8gw2eegeqs (pid:5087) >> > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 >> (pid:5087) >> > run_concurrent job_keyywb1oop73t (pid:5087) >> > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 >> (pid:5087) >> > run_concurrent job_key17gfkqtzjh (pid:5087) >> > *** FOO_WORKER/RUN_CONCURRENT at Wed Dec 31 09:15:26 +0000 2008 >> (pid:5087) >> > ==================================================== >> > >> > _______________________________________________ >> > Backgroundrb-devel mailing list >> > Backgroundrb-devel at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >> > >> >> >> >> -- >> Let them talk of their oriental summer climes of everlasting >> conservatories; give me the privilege of making my own summer with my >> own coals. >> >> http://gnufied.org >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: