No connection pool for 'ActiveRecord::Base' found
vitobotta opened this issue · comments
Hi! I swapped puma with iodine, and I am getting this when trying to run specs with capybara:
ActiveRecord::ConnectionNotEstablished:
No connection pool for 'ActiveRecord::Base' found.
Am I missing some configuration? Thanks!
Somehow I got one example passing by setting workers to 1 but now I get this:
Assertion failed: ("libev: I/O watcher with invalid fd found in epoll_ctl", errno != EBADF && errno != ELOOP && errno != EINVAL) (../libev/ev_epoll.c: epoll_modify: 134)
Hi @vitobotta ,
Thank you for your interest in iodine.
As for:
ActiveRecord::ConnectionNotEstablished:
No connection pool for 'ActiveRecord::Base' found.
Iodine will attempt to reset the connection pool whenever a worker is (re)started, in order to avoid unintended DB connection sharing between processes (which breaks the connection pool synchronization).
This used to be a big issue with multi-process servers and ActiveRecord eventually decided to implement an internal solution. However, since the error message is usually harmless (if it shows up), I often to keep support for older versions of ActiveRecord that don't implement an internal solution.
Does the error message prevent the server from running?
As for:
Assertion failed: ("libev: I/O watcher with invalid fd found in epoll_ctl", errno != EBADF && errno != ELOOP && errno != EINVAL) (../libev/ev_epoll.c: epoll_modify: 134)
This isn't iodine related. You are either still running Puma or using WebSockets with ActionCable. The iodine server doesn't use libev
, but rather uses epoll
, kqueue
and poll
directly.
I might be able to help if you offer more information, but otherwise there's not much I can do about that one.
Kindly,
Bo.
P.S.,
It could be that you added configurations to the Puma configuration file and now these aren't working probably or causing conflicts 🤔