Unable to connect to pgvector.railway.internal
Hi
I am unable to connect with my pgvector postgres db.
receiving the following error
getaddrinfo ENOTFOUND pgvector.railway.internal
for my sveltekit app (using dockerfile) I added 3 second sleep.
and for both pgvector and sveltekit added ENABLE_ALPINE_PRIVATE_NETWORKING=true in variables
sveltekit app project id 94b0bba1-afce-4b74-ac49-8aa1fb06163e
pgvector project id 171d055d-0855-415c-8f03-8b52fb322141
Solution:Jump to solution
your database and app are in different projects right? if so, they need to be in the same project
17 Replies
Project ID:
94b0bba1-afce-4b74-ac49-8aa1fb06163e,171d055d-0855-415c-8f03-8b52fb322141
do you get that error locally?
no, for local I am using external url for db
so did not got this error
postgresql://postgres:[email protected]:45850/railway
this is my connection string if its of any help. I have replaced actual password with PASSWORD
the following connection string is working
postgresql://postgres:[email protected]:45850/railway
locally internal networking is not working
you are using the private url locally, you need to use the public url
using public url locally
the issue I am facing is for the one hosted on railway
using internal url
please check this healthcheck endpoint
https://betterfaq-production.up.railway.app/healthz
code for healthcheck endpoint which only checks if db is connected or not
===
just to reiterate, using internal for connecting the application hosted on railway and db is also hosted on railway
may i ask why you showed a screenshot of you attempting to connect to the private url locally?
do you get that error locally?I mentioned that both are hosted on railway, because you asked this. sorry, english is not my first language
Solution
your database and app are in different projects right? if so, they need to be in the same project
yes, they are different projects.
any way to combine those?
it would be a manual process
thanks, I'll look it up
look what up?
how to do this
you already have, just do it in the correct project this time
got it, thanks
for the future, please read this docs page - https://docs.railway.app/overview/best-practices