a year ago
Issue Description
Our service is experiencing intermittent database connection failures on deployment, occurring in approximately 80% of deploy attempts. The service fails to establish a connection with our RDS database instance, though it eventually succeeds after multiple redeploy attempts.
Symptoms
Database connection errors during service startup
Error message indicates failure to reach database at
[redacted].us-west-1.rds.amazonaws.com:[redacted]Service requires multiple redeploy attempts to successfully connect
Affects only one specific service; other services using the same Prisma connector and database connection remain functional
Error Logs
Copy2024-12-12 01:18:15 [server] error: Error connecting to database: Can't reach database server at [redacted]
Additional Context
Issue is new; service previously deployed without connection problems
Success rate: ~20% of deploys succeed on first attempt
Other services in the same project connecting to the same database are unaffected
Using Prisma as the database connector
Impact
Delays in deploying new commits
Requires manual intervention (multiple redeploys) to get the service online
Affects deployment reliability but not runtime stability once connected
Environment
Platform: Railway
Database: AWS RDS
ORM: Prisma
Node.js (also seeing Buffer deprecation warnings, though likely unrelated)
14 Replies
a year ago
Hey,
It looks like that service is on the outdated Legacy runtime still, would you mind switching it to the V2 runtime in it's service settings and let us know if that fixes this!
Status changed to Awaiting User Response Railway • over 1 year ago
a year ago
It worked! But would be curious to learn why
Status changed to Awaiting Railway Response Railway • over 1 year ago
a year ago
Known issue with the Legacy runtime, DNS takes ~3 seconds to become available after container start, this is entirety been fixed on the V2 runtime.
Status changed to Awaiting User Response Railway • over 1 year ago
Status changed to Solved brody • over 1 year ago
Status changed to Awaiting Railway Response theodormarcu • about 1 year ago
a year ago
Just checked this again. I can't seem to be able to toggle the V2 runtime for the service.
My account is in priority boarding and I already toggled the new builder, but I don't see feature flags or anything else I can use.
Attachments
a year ago
If you don't see the runtime selector it means you are already on the V2 runtime.
We also don't recommend using the new builder right now as that project has been put on pause for the time being.
What issue are you running into?
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
Same issue as above - need many redeploys for railway to find AWS - never an issue locally or when i connect to the same DB from tableplus etc
Status changed to Awaiting Railway Response Railway • about 1 year ago
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
Here are some examples:
https://railway.com/project/368e6bfb-0e6a-4088-b420-7be3a36fb968/service/ef1a8a8c-53ed-41eb-853d-f36d62f53785?environmentId=94ff262d-52d6-4a98-ae36-8068f7f40696&id=557ec0c2-2f30-4cbc-b60d-d0fd078267e8#deploy
https://railway.com/project/368e6bfb-0e6a-4088-b420-7be3a36fb968/service/ef1a8a8c-53ed-41eb-853d-f36d62f53785?environmentId=94ff262d-52d6-4a98-ae36-8068f7f40696&id=05b13a51-553d-4e81-acdf-ea9e23f5df44#deploy
https://railway.com/project/368e6bfb-0e6a-4088-b420-7be3a36fb968/service/ef1a8a8c-53ed-41eb-853d-f36d62f53785?environmentId=94ff262d-52d6-4a98-ae36-8068f7f40696&id=2211aeea-f97d-4f9c-b33e-09cb7edd28de#deploy
Status changed to Awaiting Railway Response Railway • about 1 year ago
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
I just told you above I don't see how to change the runtime and you told me that means it's already on V2 then - can you help me figure that out then
?
Status changed to Awaiting Railway Response Railway • about 1 year ago
a year ago
It actually finally showed up again so switched it!
a year ago
Apologies for the confusion, when I sent that message the runtime selector was visible.
It would have also disappeared for admins if already V2, so you could see it as long as I can see it.
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
No worries! Thank you - was able to migrate successfully and I haven't encountered the AWS error yet
Thanks!!!
Status changed to Awaiting Railway Response Railway • about 1 year ago
Status changed to Awaiting User Response Railway • about 1 year ago
Status changed to Solved brody • about 1 year ago