Postgres Database Connection Error

lekiaanonim
PRO

10 days ago

Hi everyone, I just started having the error on Postgres.

psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: sorry, too many clients already connection to server at "localhost" (::1), port 5432 failed: FATAL: sorry, too many clients already

0 Replies

sorry, too many clients already

Where do you see this error?


lekiaanonim
PRO

10 days ago

1432571418771718100


Is it possible you have more than 100 connections?


lekiaanonim
PRO

10 days ago

I don't think so


lekiaanonim
PRO

10 days ago

Project ID: 7701f2a0-8e16-4792-bd77-b9c21f0407c6


You can redeploy to fix it immediately… but I suppose it's possible Railway isn't closing connections


Make sure your app is closing connections as well


But just redeploy


lekiaanonim
PRO

10 days ago

Okay. How do I make my app close connections?


What framework are you using


lekiaanonim
PRO

10 days ago

Django


Django should close them automatically


lekiaanonim
PRO

10 days ago

It works now after redeploying


Yeah. Do you use the Railway database UI a lot?


lekiaanonim
PRO

10 days ago

Yeah, I do


Could be an issue with Railway not closing connections. 🤷


lekiaanonim
PRO

10 days ago

Okay, I will try to find out more on the root cause


I’ll always recommend a desktop app like datagrip or dbeaver, you just have so much more control


I’m going to get flamed for saying that


Loading...
Postgres Database Connection Error - Railway Help Station