𝐗-𝐥𝐞𝐦
𝐗-𝐥𝐞𝐦
Explore posts from servers
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
Did you not have that spelling mistake locally?
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
spelling mistakes kill us all
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
😛
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
I'm assuming one's the internal port and one's the external port. If your AFW-bot has an env called Core.DATABSE_URL and it's set to ${{Postgres.DATABASE_URL}} then it should work. I'm not sure what else the issue would be :/
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
Check the DB service env variables. That's probably the port it's using.
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
The connection string should have the port already? Where are you seeing the port is wrong? In the DB env variables?
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
So run your app locally and use the public connection string to connect to that Postgres instance.
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
I'd try connecting to your railway db locally. There is a public connection string you can use.
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
Does it work locally if you use the public connection string?
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
Also the private url isn't just the password. It's the full connecction string.
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
If you print out DevCreds.DEV_SITE_PASSWORD does it print out what you expect?
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
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).
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
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.
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
I'm not familiar with poetry sorry so I'm not sure what the command would be.
64 replies
RRailway
Created by Anubhav on 8/12/2024 in #✋|help
Database private url not working
@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
64 replies
RRailway
Created by Anubhav on 7/30/2024 in #✋|help
Connect database locally
But they still have resource usage eh? They're not free
17 replies
RRailway
Created by Anubhav on 7/30/2024 in #✋|help
Connect database locally
They'll both count towards your usage. It's just better to use a private URL within your service. See: https://railway.app/changelog/2024-07-19-database-private-networking#database-private-network-defaults
17 replies
RRailway
Created by Anubhav on 7/30/2024 in #✋|help
Connect database locally
The AFW-bot can connect to the postgres instance. You should use the private DB url for that though. You can add a env variable to AFW-bot (will be something like ${{Postgres.DATABASE_PRIVATE_URL}}). Then just grab that env variable in your python application to connect to the DB.
17 replies
RRailway
Created by Anubhav on 7/30/2024 in #✋|help
Connect database locally
You want to connect to a psql DB from your local computer? If so then yes, you just need to use the public url
17 replies
RRailway
Created by Stefan on 7/7/2024 in #✋|help
Stuck on "Deploy > Creating containers"
Doing a re-deploy seems to have worked for the moment though.
39 replies