igrigorik/em-synchrony — Issue #112: Two different em_mysql2_adapter exists
Author: balepc
Created: 2012-03-01 16:59:31+00:00
State: open

I'm trying to run ActiveRecord queries outside rails using synchrony and the problem I faced is big number of mysql connections. I set pool to 1, but anyway it starts as many connections as number of fibers.

I assume this could be due to ActiveRecord uses [em_mysql2_adapter.rb](https://github.com/brianmario/mysql2/blob/a9e2fbcc7836edda4dc4a8c91f8bda86bc9d82da/lib/active_record/connection_adapters/em_mysql2_adapter.rb) from mysql2 gem, but not from [em-synchrony](https://github.com/igrigorik/em-synchrony/blob/master/lib/active_record/connection_adapters/em_mysql2_adapter.rb)

Here is a [code](https://gist.github.com/1951392)