I'm using Slick 3.0 with MySql and I'm getting terrible performance, which I want to tune. I initialize the database with
val db = Database.forConfig("horridDBStuff")
Then in application.conf
I have
horridDBStuff = {
url = "jdbc:mysql://my.db.address:3306/myschema"
driver = "com.mysql.jdbc.Driver"
connectionPool = disabled
keepAliveConnection = true
properties = {
user = "me"
password = "me"
}
}
Slick documentation says that in deployment you should enable the connection pool, so that's what I want to try. However it doesn't give an example of how to do this. I've tried commenting the line out, or replacing with connectionPool = enabled
, or connectionPool = 10
. All of these just crash Slick with a multi-page error stack. Anyone know how to properly configure the connectionPool? (Any other performance suggestions would also be appreciated - I've tried adding numThreads=10
which doesn't seem to improve things much, but at least that doesn't crash it ;)