R
Railway•8mo ago
Mrxbox98

Increase number of Postgres Clients

How do I increase the number of clients that can connect to my postgres database?
7 Replies
Percy
Percy•8mo ago
Project ID: N/A
Brody
Brody•8mo ago
how many connections would you say you need? the default max is 100
ThallesComH
ThallesComH•8mo ago
btw, i would recommend you to use something like pgbouncer instead of increasing the connection. a pgbouncer template would be nice too 👀
Brody
Brody•8mo ago
seems plenty easy https://hub.docker.com/r/bitnami/pgbouncer/ but op, if what should be done doesnt concern you, use this as the start command docker-entrypoint.sh postgres -c max_connections=300 -c shared_buffers=80MB --port=5432
Mrxbox98
Mrxbox98•8mo ago
Gotcha, I only have 5 replicas of a project that uses the db through prisma so not sure how im hitting 100 connections. Ill have to check through my code to see whats going wrong
Ryan The Temp
Ryan The Temp•8mo ago
This might be an issue with Prisma's advisory lock that is used. I've had issues working with Prisma on Railway due to that. Maybe try dissabling it.