Unable to connect to PostgreSQL instance from outside Railway
kidcrippler
HOBBYOP

6 months ago

Project name - "cooperative-peace".

I have a PostgreSQL instance running on Railway. I’m trying to connect to it using both psql (locally) and IntelliJ/DataGrip, but all attempts fail — the client just hangs and eventually times out.

The "Database Connection" section in my "Database" tab of the Postgres node/instance is trying to connect, but hangs forever.

The logs don't show anything suspicious - the last statement is "database system is ready to accept connections".

My connection string is of the form:

postgres://railway:[PASSWORD]@[DB_HOST]:5432/railway

For DB_HOST I've tried using both:
1. primary-production-759d0.up.railway.app
2. postgres-production-a8b4.up.railway.app

I did manage to initiate a connection from n8n with the same parameters and SSL disabled, but I'm not able to execute anything from there.

I can't seem to be able to create a new Postgres node instead of the existing one, not sure why.

Help would be appreciated.

$10 Bounty

2 Replies

Railway
BOT

6 months ago


kidcrippler
HOBBYOP

6 months ago

I eventually resolved this by creating a new Postgres node with a new volume, and replacing the existing one.
Unfortunately, it reset my whole server and wiped all my workloads, but seems like that was the only solution.


Loading...