New database service not reachable after v2 upgrade in railway container.
Hi, today I tried to upgrade my postgres database instance from legacy to v2 in my two projects: both are postgresql + nodejs service with prisma orm
I didn't had any issue with the first project, but for the second one i'm having some issues related to the db connection at the service startup.
Here the error logged by the console:
I'm sure that the database server is up and working since using the variable "DATABASE_URL" from my local environment i'm able to connect to the db, even with a jdbc url.
The strange thing is that this service this service also managed to connect after many attempts. But now I'm not able to deploy other upgrades since the startup always fail
Project Id 3f4bc0af-664d-4446-9e7c-486a97145272
Service Id 2ed85fc2-a245-4748-84d9-81e1d2b8acce
Anyone has experienced the same issue and resolved it?
7 Replies
Project ID:
3f4bc0af-664d-4446-9e7c-486a97145272,2ed85fc2-a245-4748-84d9-81e1d2b8acce
Solution
Could you try adding a 3 second sleep in your start command?
I have the healthcheck enabled for 300s, so the start command run also after the service initialization 🧐 if the db is unreachable, the start command will be rerun automatically later
could you try doing it anyway?
it worked but I miss what's difference 🧐
It's some issue in Railway where network takes a bit to initialize, at least as I understand
So strange 🤨 at least I expected it works after the 2nd/3rd healthcheck attempt