Does anyone know why connection to database get ideal or disconnected?

Facing a consistent issue with PostgreSQL database. For not using database after few minutes either on backend or some database client tool.

I think the connection between the cloud hosted database and database client tool goes into ideal state (or something), and because of that when I try to execute a query it continues to show the loading process and the query doesn't run.

Not sure, if that’s the valid reason for the issue.

In the process, after trying to run the query again and again, the database starts to work functional and it return the data on running the query.

I am facing this issue not only in database client tool but in the backend application too.

And every time it goes into ideal state, either I have to restart the backend application or re-connect from database client tool.

Did anyone of you face any similar issue? What are the ways to resolve this issue?

Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more

Comments (1)

Mark's photo

What do you mean by ideal state? If it's not responding, it doesn't sound ideal...

Could it be that you are creating a lot of database connections that you aren't closing, and you are running into a limit?