[Backgroundrb-devel] Intermittent "can't convert Float into Hash" and results.rb

Robert Bjarnason robert.bjarnason at gmail.com
Thu Jan 4 11:44:40 EST 2007


Hi,

I'm using backgroundrb 0.2.1 in a production environment and for most 
parts I'm very happy.  We are using it to do some heavy video editing on 
the server side and it works great except that under, what seems heavy 
load the below problem happens intermittently.

The problem has only happened 5 times out of over 500 runs by our 
backgroundrb worker.

This is the code in our worker:
              logger.debug("info : progress: #{progress}")
              progress_percent = progress * 100
              if progress_percent >= 100
                results[:progress] = 99.99
              else
                results[:progress] = progress_percent <-- Line of the crash
              end

Here is the error:
can't convert Float into Hash

And the beginning of the stack trace:
/.../ContentStore/vendor/plugins/backgroundrb/server/lib/backgroundrb/results.rb:40
:in 
`merge!'/.../ContentStore/vendor/plugins/backgroundrb/server/lib/backgroundrb/results.rb:40
:in `[]='/.../ContentStore/lib/workers/content_worker.rb:40
:in `execute_mp4box'/.../ContentStore/lib/workers/content_worker.rb:22:
in `execute_mp4box'/.../ContentStore/lib/workers/content_worker.rb:21
:in `execute_mp4box'/.../ContentStore/lib/workers/content_worker.rb:181
:in 
`do_work'/.../ContentStore/vendor/plugins/backgroundrb/server/lib/backgroundrb/worker.rb:55:
...

The problem seems to happen only under heavy load where more than 1 
worker process is active at the same time.

Any ideas or leads?

Thanks,
Robert Bjarnason



More information about the Backgroundrb-devel mailing list