Remote DB connection (use DATABASE_PUBLIC_URL) returns INTERNAL SERVER ERROR

vkostromin
FREEOP

6 months 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

6 months 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 6 months ago


6 months ago

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


vkostromin
FREEOP

6 months ago

I use pgAdmin 4


vkostromin
FREEOP

6 months ago

it works last months

Attachments


6 months 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

6 months ago

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


vkostromin
FREEOP

6 months ago

I see this warning today

Attachments


vkostromin
FREEOP

6 months ago

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


vkostromin
FREEOP

6 months ago

still not works


vkostromin

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

6 months 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

6 months 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

6 months ago

I use variable DATABASE_PUBLIC_URL


vkostromin
FREEOP

6 months ago

it works always but stop today


vkostromin

it works always but stop today

6 months ago

Please read the bullets that @root101 wrote


6 months ago

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


6 months ago

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


6 months 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

6 months ago

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


6 months ago

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


vkostromin
FREEOP

6 months ago

I've changed password in the link.


vkostromin
FREEOP

6 months 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.

6 months ago

Awesome. Change the password for it too.


6 months 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.


6 months ago

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


root101
HOBBY

6 months 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)

6 months ago

It shouldn't have been listed as an option.


adam

It shouldn't have been listed as an option.

root101
HOBBY

6 months 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

6 months ago

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


samgordon

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

vkostromin
FREEOP

6 months 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

6 months ago

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


vkostromin

yes, , it is the same group of projectshttps://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

6 months 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.


Loading...
Remote DB connection (use DATABASE_PUBLIC_URL) returns INTERNAL SERVER ERROR - Railway Help Station