Whenever I have an application using ActiveRecord I get this ConnectionTimeoutError - but always after a certain unknown period of time
ActiveRecord::ConnectionTimeoutError (could not obtain a database connection within 5 seconds. The max pool size is currently 30; consider increasing it.):
It was previously set to 5, we have already increased it, and there is no way it can be using 30 connections at the same time. The only thing we use ActiveRecord for is our session store.
Our database.yml file looks like:
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 30
timeout: 5000
(Test and production settings are the same)
I have been googling this occurrence, and just came across this posting:
https://groups.google.com/forum/#!msg/copenhagen-ruby-user-group/GEHgi_WudmM/gnCiwWqmVfMJ
Which mentions that ActiveRecord does not check a connection back into the pool once it is done with it?? Is that true? Do I need to manually manage the connections?
I appreciate any advice!!
edit I should probably mention I am running Rails 3.1.3
activerecord-jdbc-adapter using version 1.2.2
,activerecord-jdbcsqlite3-adapter using version 1.2.2
, andjdbc-sqlite3 using version 3.7.2
– Coulometer