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

No connection pool for 'ActiveRecord::Base' found #105

Open
vitobotta opened this issue May 28, 2021 · 3 comments
Open

No connection pool for 'ActiveRecord::Base' found #105

vitobotta opened this issue May 28, 2021 · 3 comments

Comments

@vitobotta
Copy link

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!

@vitobotta
Copy link
Author

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)

@boazsegev
Copy link
Owner

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.

@boazsegev
Copy link
Owner

P.S.,

It could be that you added configurations to the Puma configuration file and now these aren't working probably or causing conflicts 🤔

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

No branches or pull requests

2 participants