Postgres connection terminated unexpectedly
Hi, I have a simple express server using typescript with prisma. I have a postgres database hosted on railway.
I cannot figure why the db connection seems to stop brutally and make the app crash
According to the app logs, it happens at random times.
The error is the following:
Is this a known issue ? Am I missing something in the config ?
4 Replies
Project ID:
f9a74fea-b8e0-4256-bdf0-ff786bd5f870
f9a74fea-b8e0-4256-bdf0-ff786bd5f870
On the database side the log is:
are you keeping too many connections open?
I'm following prisma guidelines on this. I don't manually handle connections and let the orm do it. I have only one client shared by my app services. It might use a pool of connections (that's why we see a couple of them on the db logs) instead of just 1.