PostgresSQL server closed
yaugourt
PROOP

3 months ago

My PostgreSQL service (historical DB) is running fine (checkpoints every 5 min in logs, no crashes), but the public proxy refuses all connections.

TCP connection to maglev.proxy.rlwy.net:11974 succeeds (nc -zv = connected)

But psql immediately gets "server closed the connection unexpectedly" with any sslmode (require/disable)

The DB logs show healthy checkpoints up to 19:11 UTC, no FATAL errors visible

Other PostgreSQL service in the same project (postgres.railway.internal) works fine

Is the proxy for this specific service broken/rate-limited/blocked?

$10 Bounty

15 Replies

yaugourt
PROOP

3 months ago

@Brody


yaugourt
PROOP

3 months ago

anyone please?


3 months ago

That runs PG17, what version of psql are you using?


yaugourt
PROOP

3 months ago

The psql client I'm using locally is an older version (likely 14 or 15 via WSL). But that shouldn't matter since the TCP connection succeeds — the issue is the connection drops immediately after the handshake, before any protocol exchange. Could it be a version mismatch between the proxy and the client?


yaugourt
PROOP

3 months ago

Ok checked same version, psql 17.5. Still getting immediate connection drop after TCP handshake.


yaugourt
PROOP

3 months ago

image.png

Attachments


3 months ago

Could I run a connection test with a Postgres client? If so, could you DM me the database URL?


yaugourt
PROOP

3 months ago

Yes


3 months ago

Works.

image.png

Attachments


yaugourt
PROOP

3 months ago

Still can't access to the data here

image.png

Attachments


yaugourt
PROOP

3 months ago

and having this message when I try a deploy:

Error: P1001: Can't reach database server at postgres-sazm.railway.internal:5432

Please make sure your database server is running at postgres-sazm.railway.internal:5432.

Loaded Prisma config from prisma.config.ts.

Prisma schema loaded from prisma/schema.prisma.


yaugourt
PROOP

3 months ago

The external proxy maglev.proxy.rlwy.net:11974 works (you just showed it), but the internal hostname postgres-sazm.railway.internal:5432 is unreachable from my backend service. My backend keeps crashing with P1001: Can't reach postgres-sazm.railway.internal:5432. Both services are in the same project. Is the internal networking broken for this specific postgres service?


3 months ago

The private network is not available during build time, only at runtime.


yaugourt
PROOP

3 months ago

But why can't access to the data here and can for the another db ?

image.png

Attachments


yaugourt
PROOP

3 months ago

Ok now it works thanks


Welcome!

Sign in to your Railway account to join the conversation.

Loading...