Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition #5

Open
mainameiz opened this issue Aug 21, 2016 · 0 comments
Open

Race condition #5

mainameiz opened this issue Aug 21, 2016 · 0 comments

Comments

@mainameiz
Copy link
Collaborator

Когда запускаю код в sidekiq вываливается такая ошибка:

Mysql2::Error: This connection is in use by: #<Celluloid::Thread:0x0000000b27eba0@/home/nmarkov/.rvm/gems/ruby-2.2.5@publisher/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:10 sleep>: SELECT IS_USED_LOCK('Stats::Sessions::RawSessionFile-57b9fad26ecea4638db826c7') AS tb33a94887d76fa5b25cfa30466c25a72

Из-за того, что в каждом треде используется один и тот же connection:

ProbableGiggle::Configuration.connection = ActiveRecord::Base.connection

Скоро исправлю...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant