R
Railway7mo ago
Driaug

Applications having trouble connection to database

I've hosted my applications for quite some time on Railway and have noticed that with the new databases, my applications very often refuse to connect. I've added a container running Ghost (blogging platform) and a MySQL database and Ghost is having serious trouble connecting to the database. Up to the point where it is infuriating and fails on API calls every 5-10 seconds Project ID for this specific one is 23b0e8b7-ef52-4f6b-8683-9bf8157a7bf1 but I've been having it on other projects as well.
7 Replies
Percy
Percy7mo ago
Project ID: 23b0e8b7-ef52-4f6b-8683-9bf8157a7bf1
Brody
Brody7mo ago
@jr - trouble connecting to the database
Driaug
Driaug7mo ago
To add to the example, this is the error that Ghost throws regularly An unexpected error occurred, please try again. getaddrinfo ENOTFOUND roundhouse.proxy.rlwy.net',. I've had Prisma/Node.js refuse connection as well but don't have an error on hand.
Driaug
Driaug7mo ago
Prisma throws a very similar error
No description
Brody
Brody7mo ago
can you try to add a 3 second sleep to the beginning of your start command?
Driaug
Driaug7mo ago
It's a possibility to do so with the apps that I control, they only have it on first connect. They automatically retry and connect on a 2nd or 3rd attempt so it's not the worst. Ghost on the other hand is a Docker container out of my control and it keeps throwing the error when it's running, not only on start
Brody
Brody6mo ago
Ghost on the other hand is a Docker container out of my control
nope, you can set start commands for docker images too!