Remote DB connection (use DATABASE_PUBLIC_URL) returns INTERNAL SERVER ERROR
vkostromin
FREEOP

a year ago

Can't connect to DB from remote host, return error INTERNAL SERVER ERROR.

I use DATABASE_PUBLIC_URL to connect, it works always and stoped today

$20 Bounty

30 Replies

a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 12 months ago


a year ago

hey, can you give more information about your code? What are you using to connect to your database?


vkostromin
FREEOP

a year ago

I use pgAdmin 4


vkostromin
FREEOP

a year ago

it works last months

Attachments


a year ago

I'm looking more on what ORM/library you're using to connect to your database that is giving out INTERNAL SERVER ERRORs


vkostromin
FREEOP

a year ago

API Server can connect to DB, but I cann't connect to DB


vkostromin
FREEOP

a year ago

I see this warning today

Attachments


vkostromin
FREEOP

a year ago

Api server use nodejs + prisma, it works, Doesn't work remote connection


vkostromin
FREEOP

a year ago

still not works


vkostromin

Api server use nodejs + prisma, it works, Doesn't work remote connection

a year ago

Can you please confirm the value of which that variable is set to? Not the actual value, but what variables it's referencing. For example, postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}

Additionally, is there any more information you could get about the error you're getting? It's pretty vague. What are client are you using to connect? Does the viewer built into Railway work?


root101
HOBBY

a year ago

Couple of things:

1 - The warning about the public URL of the database has always been there. Railway basically recommends always connecting through the internal URL to avoid egress feeds. Additionally, for security reasons, it is good practice to keep the database from being openly exposed to the Internet.

2 - Can you provide a more detail stack trace, logs, or something about the error, so we can look at it in order to find the error

3 - Try the good old restart the service, go to the last deployment, in the 3 dots, click redeploy... and try again


vkostromin
FREEOP

a year ago

I use variable DATABASE_PUBLIC_URL


vkostromin
FREEOP

a year ago

it works always but stop today


vkostromin

it works always but stop today

a year ago

Please read the bullets that @root101 wrote


a year ago

Also, you just posted your database access URL. I would recommend deleting that. Reset that password immediately.


a year ago

And do not by any means share your password for it here... even though you already did.


a year ago

And FYI, I can connect just fine. Something is wrong with whatever you're using to connect, or how you set that up.


root101
HOBBY

a year ago

@loudbook, i just say i was gonna share it, not worries, i will delete the db soon enough, is just a test


a year ago

Not you. OP shared their password in an above message.


vkostromin
FREEOP

a year ago

I've changed password in the link.


vkostromin
FREEOP

a year ago

I disconnect from server and then connect to server in pgAdmin 4. it works now.

But other container seems has the same problem


vkostromin

I've changed password in the link.

a year ago

Awesome. Change the password for it too.


a year ago

Root, do not ask for people's database credentials. vk, it's extremely risky to share credentials with anyone, they're like a password for your database.


a year ago

I've deleted both URLs from this thread. Please be more careful in the future


root101
HOBBY

a year ago

hi adam, i just say it was not recommended, just trying to reproduce the error on my end..... i even share a test DB (That bd im deleteing it like now)


root101

hi adam, i just say it was not recommended, just trying to reproduce the error on my end..... i even share a test DB (That bd im deleteing it like now)

a year ago

It shouldn't have been listed as an option.


adam

It shouldn't have been listed as an option.

root101
HOBBY

a year ago

okay, noted


vkostromin

I disconnect from server and then connect to server in pgAdmin 4\. it works now. But other container seems has the same problem

a year ago

Another container within the same project? That's also pgAdmin?


samgordon

Another container within the same project? That's also pgAdmin?

vkostromin
FREEOP

a year ago

yes, , it is the same group of projects

https://railway.com/project/db6dfaa4-f18d-482d-96fc-bdd31078d43c/service/a2981f82-a255-4466-80c7-b4b405f65854. it is PHP based site. , Seems like connect is stuck too. But remote connect works, I'll work on it tomorrow


vkostromin

I disconnect from server and then connect to server in pgAdmin 4\. it works now. But other container seems has the same problem

root101
HOBBY

a year ago

as i said in point #3, good old restart all (including conections in pgadmin)


vkostromin

yes, , it is the same group of projects <https://railway.com/project/db6dfaa4-f18d-482d-96fc-bdd31078d43c/service/a2981f82-a255-4466-80c7-b4b405f65854>. it is PHP based site. , Seems like connect is stuck too. But remote connect works, I'll work on it tomorrow

a year ago

So, is it in the same project? Or in a different project?

That link is not something we can view because your project is private.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...