R
Railway•10mo ago
vicenters

FATAL: sorry, too many clients already

I am trying to connect to PostgreSQL and I am getting this error a while after I restart the database.
11 Replies
Percy
Percy•10mo ago
Project ID: N/A
vicenters
vicenters•10mo ago
No description
Brody
Brody•10mo ago
whatever is using the database is opening too many connections and not closing them
vicenters
vicenters•10mo ago
Is there a way of increasing the max connection on railway?
Brody
Brody•10mo ago
of course, but you would just run into the issue again, you need to close the connections after you are done with them, preferably use a connection pool
vicenters
vicenters•10mo ago
According to what I have read from Hibernate, I guess I am doing that
No description
Brody
Brody•10mo ago
the default limit is 100 connections, if you are hitting that limit then something is wrong with the code and if you're hitting that 100 connection limit, increasing the limit would only delay you from hitting the new limit. of course there are actual cases where you do need 100 or more connections, in that case you want to use pgpool, but I have a good feeling you don't need a lot of connections and it's just a code bug
vicenters
vicenters•10mo ago
how can I decrease that 100 limit?
Brody
Brody•10mo ago
why would you want to decrease it? the default is fine you just got some debugging to do is all
vicenters
vicenters•10mo ago
some hardcore nasty debugging by decreasing it 💀
Want results from more Discord servers?
Add your server