I get the error:
Error "ActiveRecord::ConnectionTimeoutError - could not obtain a database connection within 5 seconds. The max pool size is currently 5; consider increasing it."
How do I increase the max pool size?
# DB CONNECTION DB_CONN = ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :dbfile => DB_FILE)
ActiveRecord::Base indicates that the ActiveRecord class or module has a static inner class called Base that you're extending.
For anyone else who is looking for an answer to this question, the basic idea seems to be that a database can only support so many simultaneous connections, so there needs to a way to limit the open connections. The pool attribute specifies the maximum number of connections that can be opened at a given time.
config/database.yml pool: 8 (default is 5)
Read more
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With