a year ago
I cannot connect to the postgres service via the private database url on my laravel application. When I use the public database url it works fine but with a high latency that returns timeout errors sometimes. When I use the private database url I get this error:
railway SQLSTATE[08006] [7] could not translate host name "postgres.railway.internal" to address: Name or service not known
I need to be able to connect the private database to reduce the latency and keep my application up and running without database timeout errors.
3 Replies
a year ago
Hello,
The private network is not available during build, so can you adjust your build and pre-deploy commands accordingly -
Build -> npm run build && php artisan optimize
Pre-Deploy -> php artisan migrate --force
And then switch the database URL back to the private URL.
Best,
Brody
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
Thanks, it worked!
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