SQLException: Timed out waiting for a free available connection
I think the problem is the same of Heroku/Play/BoneCp connection issues
Heroku close the connections after 30 seconds.
After adding boneCp 0.8.0.rc1, on Build.scala and
db.default.idleMaxAge=10 minutesdb.default.idleConnectionTestPeriod=30 secondsdb.default.connectionTimeout=20 seconddb.default.connectionTestStatement="SELECT 1"db.default.maxConnectionAge=30 minutes
but I still got the timeout error, specifically when i left the page opened and then hit refresh.
I had faced the same issue.This issue occured when there is huge reuqest thread on your Play Application and play can't able to maintain DB pool.To make Play comfortable for maintaining DB pool You need to add below three point in you aplliaction.conf files
- db.default.maxConnectionsPerPartition=100 // this say what Maxconnection your Play Framework need ti maintain
- db.default.minConnectionsPerPartition=10 //During start minimum howmany DB connection it should have
- db.default.acquireIncrement=10 // Once Db connection exceed tomaxConnectionsPerPartition then how much it need to assign more inpool