Unnable to connect database service after migration

I made the migration from database legacy plugin to database service as requested using the one-click automated migration, after that my API service started crashing because it was unable to connect with my database service. I've tried to connect with the database service using the DATABASE_PRIVATE_URL and DATABSE_URL and none of this worked
Solution:
stick to using DATABASE_URL for now please try this solution https://discord.com/channels/713503345364697088/1194241277517115443/1194568475071483944...
Jump to solution
21 Replies
Percy
Percy•8mo ago
Project ID: N/A
saavedragaming98
saavedragaming98•8mo ago
numerous-twist Project ID: 24a05dcd-a288-4ba9-8e93-246f8cb9f0fb
Brody
Brody•8mo ago
can you connect to the database locally with something like dbgate?
saavedragaming98
saavedragaming98•8mo ago
Yes
Brody
Brody•8mo ago
what environment variable do you use in your code to connect to the database?
saavedragaming98
saavedragaming98•8mo ago
I runned my API service locally using the public connection string and worked correctly DATABASE_URL
Brody
Brody•8mo ago
and you have that set as a service variable?
saavedragaming98
saavedragaming98•8mo ago
Yup
Brody
Brody•8mo ago
are you using the reference variable syntax? as shown here https://docs.railway.app/guides/variables#referencing-another-services-variable
saavedragaming98
saavedragaming98•8mo ago
No description
saavedragaming98
saavedragaming98•8mo ago
I've also tried setting the value with Postgres.DATABASE_PRIVATE_URL
Brody
Brody•8mo ago
looks good, what specific error are you getting in the logs?
saavedragaming98
saavedragaming98•8mo ago
No description
saavedragaming98
saavedragaming98•8mo ago
This happens when I use Postgres.DATABASE_URL
Brody
Brody•8mo ago
at what point in your applications lifecycle do you see this error
Want results from more Discord servers?
Add your server