igrigorik/em-synchrony — Issue #69: Dead Fiber Called problems with mysql2 & em-synchrony
Author: tobsch
Created: 2011-10-10 21:36:02+00:00
State: open

Hi there,

I randomly get this exception in a mysql2/fiber_pool/em-syncrhony/rails3.1 setup:

```
/home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.7/lib/active_record/connection_adapters/em_mysql2_adapter.rb:53:in `resume': dead fiber called (FiberError)
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.7/lib/active_record/connection_adapters/em_mysql2_adapter.rb:53:in `block in query'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.3/lib/em/deferrable.rb:155:in `call'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.3/lib/em/deferrable.rb:155:in `set_deferred_status'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.3/lib/em/deferrable.rb:194:in `fail'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.7/lib/active_record/connection_adapters/em_mysql2_adapter.rb:38:in `rescue in notify_readable'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.7/lib/active_record/connection_adapters/em_mysql2_adapter.rb:33:in `notify_readable'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.3/lib/eventmachine.rb:199:in `run_machine'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.3/lib/eventmachine.rb:199:in `run'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/backends/base.rb:61:in `start'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/server.rb:159:in `start'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/controllers/controller.rb:86:in `start'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/gems/thin-1.2.11/bin/thin:6:in `'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/bin/thin:19:in `load'
from /home/rails/sites/adserver/shared/bundle/ruby/1.9.1/bin/thin:19:in `

'
```
is this a known problem or is there any solution for this?
I already had it without em-synchrony (just fiber-pool & mysql2).

-Tobias