R
Railway•11mo 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•11mo ago
Project ID: N/A
vicenters
vicentersOP•11mo ago
No description
Brody
Brody•11mo ago
whatever is using the database is opening too many connections and not closing them
vicenters
vicentersOP•11mo ago
Is there a way of increasing the max connection on railway?
Brody
Brody•11mo 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
vicentersOP•11mo ago
According to what I have read from Hibernate, I guess I am doing that
No description
Brody
Brody•11mo 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
vicentersOP•11mo ago
how can I decrease that 100 limit?
Brody
Brody•11mo ago
why would you want to decrease it? the default is fine you just got some debugging to do is all
vicenters
vicentersOP•11mo ago
some hardcore nasty debugging by decreasing it 💀
Want results from more Discord servers?
Add your server