Can't establish a DB connection. (Maybe threads related)
Posted
by JobGovernor
on Stack Overflow
See other posts from Stack Overflow
or by JobGovernor
Published on 2010-04-11T15:58:41Z
Indexed on
2010/04/11
16:03 UTC
Read the original article
Hit count: 206
activerecord
|connection
Hello,
I am getting this exception on the Rufus::Scheduler
ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5 seconds. The max pool size is currently 30; consider increasing it.
I've increased the pool from 10 to 30. And I also monkey patched the method which raises the exception to also call ActiveRecord::Base.verify_active_connections!
before doing its job.
And I also restarted the service which executes the script so that the new code is run.
Any ideas would be greatly appreciated.
Let me know if you need any other info about environment or whatnot.
Thank you.
© Stack Overflow or respective owner