Slick 3.0 with default connection pool and postgresql 9.4.4 with too many clients error
I am currently building a microservices application. I have three instances that actually interact with the database, i.e. Postgresql 9.4.4.
Below are my connection properties with Slide 3.0
dev {
# Development Database configuration
# ~~~~~
dbconf {
dataSourceClass="org.postgresql.ds.PGSimpleDataSource"
properties {
user="xyz"
password="dev@xyz"
databaseName="dev_xyz"
serverName="localhost"
}
numThreads=10
}
}
The problem is I am getting this FATAL: sorry too many clients are already wrong. max_connections in postgresql is 100, which is the default. As per the discussions on the internet, I might have to use a connection pool for this, which I do using HikariCP's default Slick connection pool. I'm just confused right now which step I should take to fix this problem.
+3
source to share