Closed arr-dev closed 10 years ago
I have seem to found the issue.
It happens only when used with Unicorn.
Workaround is to use
after_fork do |server, worker|
ActiveRecord::Base.connection.initialize_shards(Octopus.config)
end
as suggested by @LongMan in #59.
I have also added a before fork
before_fork do |server, worker|
ActiveRecord::Base.connection_proxy.instance_variable_get(:@shards).each do |shard, connection_pool|
connection_pool.disconnect!
end
end
but even without it, it works fine, with after_fork, of course.
Is this correct, will it cause some issues I am not aware of?
Hi @soul-rebel ,
I don't see any side effects of your fix. I'm closing your issue, if you need more help, please reopen.
Best,
Thaigo
When Octopus is enabled, no ActiveRecord runtime is shown in logs.
Without Octopus, it works fine.
Some quick workaround would be good also