29 Replies
Project ID:
2ff8f070-ab0c-4ee7-9676-2d3b36a36e0f
wow
it auto detected
dont know why but its not getting connected
my service is down and i want to make it active again : ( urgently
this is how i am connecting to db
i really need to get this service up quickly : (
@Anubhav
Make sure you're giving enough time for the private network to initialize.
Currently, private networks take up to 3 seconds to initialize on deploy. ... If you experience errors like those above, consider implementing a sleep or other wait mechanism in your app, before attempting to connect.https://docs.railway.app/guides/private-networking#initialization-time
i am using poetry run start does it will support sleep?
sleep 3 && poetry run start
right?I'm not familiar with poetry sorry so I'm not sure what the command would be.
: (
In my program I just check to see if the DB connection failed and then try again in 5 seconds. That fixed it for me.
ok i just deployed with sleep 3 hoping to work
i have added asyncio.sleep at my connect method
so it waits
hopefully it works
i am still getting same warning
not fixed at all
my code
: (
Does this work locally? I'm not seeing in your code where you're getting the env variable (I'm assuming you're using an env variable to pass your DB private URL to your application).
it does work locally
and works perfectly : (
i am not able to establish connection on railway for some reason
If you print out
DevCreds.DEV_SITE_PASSWORD
does it print out what you expect?yep
its another api creds
Also the private url isn't just the password. It's the full connecction string.
i referenced it
Does it work locally if you use the public connection string?