Databases not connecting after a failed payment
exxayo
HOBBYOP

2 years ago

I have some services running on Railway for a long time but I missed the payment.

I paid and restarted all services but the databases were not connecting, I have 3 of them.

Kindly help

115 Replies

exxayo
HOBBYOP

2 years ago

NA


exxayo
HOBBYOP

2 years ago

@Brody kindly check this out


2 years ago

<#727685388893945877> #5


exxayo
HOBBYOP

2 years ago

what do you need ?


2 years ago

please read it


exxayo
HOBBYOP

2 years ago

I have


exxayo
HOBBYOP

2 years ago

I am not sure what to look for


2 years ago

5


exxayo
HOBBYOP

2 years ago

I have been trying to get this fixed for 6 hours straight


exxayo
HOBBYOP

2 years ago

Okay, am I supposed to do something ?


2 years ago

read readme #5


exxayo
HOBBYOP

2 years ago

5) Be courteous of people's time and space. Do NOT directly ping/DM any Team/Helpers/etc.


exxayo
HOBBYOP

2 years ago

correct ?


exxayo
HOBBYOP

2 years ago

Got it,

I don't think I directly DM anyone


2 years ago

ping


exxayo
HOBBYOP

2 years ago

Okay, as i said earlier I have been trying to fix the db connection issue on my railway for about 6 hours now.

They are 3 different services and they are in production.


exxayo
HOBBYOP

2 years ago

this affects our business.


2 years ago

are you on pro?


exxayo
HOBBYOP

2 years ago

just checked, it's hobby


2 years ago

you should not be running a business on a hobby plan meant only for hobby projects, please upgrade to pro at your earliest convenience


exxayo
HOBBYOP

2 years ago

understood


exxayo
HOBBYOP

2 years ago

can you see my actual problem in the first message of the thread ?


2 years ago

what is the state of your database deployment


exxayo
HOBBYOP

2 years ago

it's deployed


exxayo
HOBBYOP

2 years ago

i don't have a deployment issue


exxayo
HOBBYOP

2 years ago

only that the db fails to connect


2 years ago

please tell me the state of the deployment


exxayo
HOBBYOP

2 years ago

Active


2 years ago

send the deploy logs for postgres please -


exxayo
HOBBYOP

2 years ago

do i upload here ?


2 years ago

yes


exxayo
HOBBYOP

2 years ago


2 years ago

thanks, show me a screenshot of the public networking


exxayo
HOBBYOP

2 years ago

1247594418060398800


exxayo
HOBBYOP

2 years ago

should i wait for a fix on the dashboard or how is it going to work ?


2 years ago

try re-deploying the database


exxayo
HOBBYOP

2 years ago

thanks


exxayo
HOBBYOP

2 years ago

was anything changed or you think redploying fixes it ?

I just redeployed but I see the same kind of log


exxayo
HOBBYOP

2 years ago


2 years ago

can you connect to it


exxayo
HOBBYOP

2 years ago

1247599944593047600


exxayo
HOBBYOP

2 years ago

after showing this for a while, it sometimes open up the data then it disconnects again


2 years ago

please use a proper database client like dbgate


exxayo
HOBBYOP

2 years ago

it works before now,
However, my interest is not seeing the db, but to make the connection work on the backend we are using.

The connection issue breaks the backend


2 years ago

are you able to connect to the database with dbgate?


exxayo
HOBBYOP

2 years ago

trying that


exxayo
HOBBYOP

2 years ago

i have been able to connect


exxayo
HOBBYOP

2 years ago

using dbgate


2 years ago

have your application connect to the database via the private network


exxayo
HOBBYOP

2 years ago

ok


exxayo
HOBBYOP

2 years ago

the application log prints the same issue and it's now crashed


exxayo
HOBBYOP

2 years ago

can't reach database server @ ….


2 years ago

please include the full error message


exxayo
HOBBYOP

2 years ago


2 years ago

what is your current start script


exxayo
HOBBYOP

2 years ago

start is default


exxayo
HOBBYOP

2 years ago

The database itself fails to connect, so i don't think it is an issue from the application


2 years ago

I don't know what "start is default" means, please tell me what you have for your start script


exxayo
HOBBYOP

2 years ago

i am not sure of that but we didnt put anything if it's the start command


exxayo
HOBBYOP

2 years ago

got it?


2 years ago

please tell me what you have for your start script, if you are unfamiliar with node development, this can be found in your package.json


exxayo
HOBBYOP

2 years ago

nest start


2 years ago

try changing that to sleep 3 && nest start


exxayo
HOBBYOP

2 years ago

doesn't work.


2 years ago

please show me your scripts


exxayo
HOBBYOP

2 years ago

okay, i will check but just to be clear,

  1. if i make a new environment of the databse and enter it to the application, it will work.

  2. The app deploys and start properly, there is. no start problem as we have been using it until I noticed subscription ended today


exxayo
HOBBYOP

2 years ago

1247654119716683800


2 years ago

please try my suggested fix


exxayo
HOBBYOP

2 years ago

it doesn't work


2 years ago

im not seeing my suggested fix here?


exxayo
HOBBYOP

2 years ago

i entered it directly on railway


2 years ago

please show me how you have implemented it


exxayo
HOBBYOP

2 years ago

i edited this now, I am waiting for the build


exxayo
HOBBYOP

2 years ago

I edited the "start" to with the value you sent


exxayo
HOBBYOP

2 years ago

1247664559410512000


2 years ago

i had previously asked you to have your app connect to the database via the private network, please do that now


exxayo
HOBBYOP

2 years ago

yes, i used it and it crashed,

I just tried it now, same thing


2 years ago

please always show the error


exxayo
HOBBYOP

2 years ago

it's the same thing, no differnce


2 years ago

every little bit of info helps


2 years ago

im only trying to help you


exxayo
HOBBYOP

2 years ago


2 years ago

thank you


2 years ago

is the database in the same project?


exxayo
HOBBYOP

2 years ago

what does in the same project mean ?


2 years ago

same railway project


exxayo
HOBBYOP

2 years ago

no


2 years ago

please show a screenshot of your railway project


exxayo
HOBBYOP

2 years ago

1247669708375851000


exxayo
HOBBYOP

2 years ago

i just tried creating a db in the project now, i deleted it after that.


exxayo
HOBBYOP

2 years ago

I have 4 different services running.
1 worked well after making the payment but the remaining have issues with db connection


2 years ago

your database needs to be in the same project to use the private network


exxayo
HOBBYOP

2 years ago

got it, what's to be done ?


2 years ago

move your bot service into the same project as the database


exxayo
HOBBYOP

2 years ago

i don't see how to move it


2 years ago

its a manual process


exxayo
HOBBYOP

2 years ago

i create a new database ?


2 years ago

i did not say that


exxayo
HOBBYOP

2 years ago

manual is not clear


2 years ago

you need to deploy your bot service into the same project as the database


exxayo
HOBBYOP

2 years ago

ok


exxayo
HOBBYOP

2 years ago

this trick works.

Thanks!


2 years ago

no problem


2 years ago

you do need to keep the sleep 3


2 years ago

please dont remove that or you will face issues again


exxayo
HOBBYOP

2 years ago

okay.

Why does it need the sleep 3


2 years ago

the private network is not available for the first 3 seconds


exxayo
HOBBYOP

2 years ago

okay


exxayo
HOBBYOP

2 years ago

but what's wrong with the public network


2 years ago

nothing, you had something missconfigured, so its better to use the private network as that wont result in database <--> service egress fees


exxayo
HOBBYOP

2 years ago

okay, but the database doesn't connect as well, so could that be from me ?


2 years ago

this would be due to a misconfiguration on your side, unfortunately i was not able to find out what that is, but either way, using the private network is much preferred


exxayo
HOBBYOP

2 years ago

okay, thanks


2 years ago

no problem!


2 years ago

tl;dr: add a 3 second sleep to the beginning of your start command and connect to the database over the private network


Loading...