nevans/resque-pool — Issue #47: Getting a cant modify frozen object error in resque workers
Author: dhruvg
Created: 2012-02-07 05:47:12+00:00
State: open

I recently started using resque-pool and I noticed that I get errors like the following:

Can't modify frozen object
/home/ec2-user/.rvm/gems/ruby-1.9.2-p290/gems/json_pure-1.6.1/lib/json/pure/generator.rb:219:in `configure'
/home/ec2-user/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/json/encoding.rb:61:in `options_for'
/home/ec2-user/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/json/encoding.rb:46:in `block in encode'
/home/ec2-user/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/json/encoding.rb:77:in `check_for_circular_references'
/home/ec2-user/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/json/encoding.rb:45:in `encode'
/home/ec2-user/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/json/encoding.rb:30:in `encode'
/home/ec2-user/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/core_ext/object/to_json.rb:20:in `to_json'
/home/ec2-user/.rvm/gems/ruby-1.9.2-p290/gems/json_pure-1.6.1/lib/json/pure/generator.rb:246:in `generate'
/home/ec2-user/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/json/common.rb:212:in `generate'

This happens inside my worker logic.

I am using only one resque worker in the resque-pool for simplicity.

I don't face this issue without resque-pool (i.e. when I just use resque rake tasks with one or more workers).

Any idea what can be causing this?