Connection Error: Connection ended unexpectedly

Railway seems to have a bug where the connection between our nodejs server and the postgres db ( in the same railway project) have connection issues midway through a query. keep getting the following error: Connection Error: Connection ended unexpectedly Connection Error: Connection ended unexpectedly Connection Error: Connection ended unexpectedly Connection Error: Connection ended unexpectedly Connection Error: Connection ended unexpectedly Connection Error: Connection ended unexpectedly Connection Error: Connection ended unexpectedly Connection Error: Connection ended unexpectedly Project ID: aa5f6f94-b4b8-4582-bfda-61de1da9b940
8 Replies
Percy
Percy13mo ago
Project ID: N/A
Daniel Glassford
Daniel Glassford13mo ago
Project ID added to the post
Brody
Brody13mo ago
can you run queries from pgadmin without issues?
Daniel Glassford
Daniel Glassford13mo ago
It’s only intermittent, like once no traffic is hit the server or DB for hours
Brody
Brody13mo ago
not a railway bug, just improper database connection handling on your part, to fix set your pool minimum to zero
Brody
Brody13mo ago
Daniel Glassford
Daniel Glassford12mo ago
Oh wow thank you very interesting I will try this Btw this fixed it thank you Brody!
Brody
Brody12mo ago
no problem, I see this issue pop up every now and then, even from projects not even using strapi, so I'm glad this is the correct and proper solution