Commit d9c431b1 authored by Tom Käsler's avatar Tom Käsler

make use of hikariCP connection pool

fix sessionmanagement for slick
parent 032347b4
Pipeline #7905 passed with stages
in 3 minutes and 25 seconds
akka {
loglevel = WARNING
http {
server {
idle-timeout = 60s
request-timeout = 20s
bind-timeout = 1s
}
host-connection-pool {
max-connections = 4
idle-timeout = 30s
}
}
}
database = {
......@@ -9,10 +20,14 @@ database = {
user = ${?PSQL_USER}
password = "arsnova3_prototype"
password = ${?PSQL_PASSWORD}
driver = com.mysql.jdbc.Driver
numThreads = 1
connectionPool = disabled
keepAliveConnection = false
driver = com.mysql.cj.jdbc.Driver
connectionPool = "HikariCP"
numThreads = 10
keepAliveConnection = true
connectionTimeout = 30 seconds
maxLifetime = 5 minutes
maximumPoolSize = 10
leakDetectionThreshold = 2000
}
http {
......@@ -20,17 +35,5 @@ http {
port = 9000
}
akka.http {
server {
idle-timeout = 60s
request-timeout = 20s
bind-timeout = 1s
}
host-connection-pool {
max-connections = 4
idle-timeout = 30s
}
}
logger.scala.slick = DEBUG
logger.scala.slick.session = DEBUG
......@@ -5,7 +5,5 @@ trait DatabaseConfig extends Config{
import driver.api._
def db: Database = Database.forConfig("database")
implicit val session: Session = db.createSession()
val db: Database = Database.forConfig("database")
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment