Production database has become totally unreachable
andrewgold
PROOP

18 days ago

Project: monorepo

Environment: production

Production environment ID: 7396af74-073b-495e-b542-c177f0b68e4d

Impact:

Our production app is down.

Affected services:

  • backend_database

    service ID: 45bfdd8c-fe78-4fb6-a9fa-e15d3e829842

    instance ID: 3089ae96-500c-462e-99c9-78d25f81362f

    latest deployment ID: 6ff5ac80-a251-46ef-956c-5c65bb2638bd

    latest deployment reason: redeploy

    image: ghcr.io/railwayapp-templates/postgres-ssl:16.13

  • backend_bouncer

    service ID: 95d314bb-07cd-4875-8c1c-92cfb1c5ffd6

    instance ID: 4ad45b01-8c43-43a0-97d0-631594d8a91b

    latest deployment ID: a127f930-6a01-4c72-9df2-064a2561b6de

    image: railwayapp/pgbouncer:latest

  • backend_app

    service ID: f1307a8c-3576-462a-8805-6d2f210907be

    instance ID: 76d16700-cdf0-467c-9108-56e666501756

    latest deployment ID: 55c02f91-8043-4763-a961-a00ef7e9fc32

Timeline / evidence:

  • 2026-06-19T13:27:31Z: backend started returning Prisma connection pool timeouts on /auth/refresh.

  • 2026-06-19T13:27:57Z: /auth/guest also failed with Prisma pool timeout.

  • 2026-06-19T13:28:39Z onward: PgBouncer logs show server connection failures to Postgres.

  • 2026-06-19T13:29-13:31Z: PgBouncer logs repeated query_wait_timeout.

  • 2026-06-19T13:31:39Z: PgBouncer received SIGTERM and restarted.

  • 2026-06-19T13:31:55Z: PgBouncer restarted and began “Waiting for PostgreSQL backend to be accessible”.

  • 2026-06-19T13:32:07Z: backend_app failed boot with:

    PrismaClientInitializationError: Can't reach database server at pgbouncer.railway.internal:6432

  • 2026-06-19T13:38:35Z, 13:45:16Z, and 13:51:57Z: PgBouncer logs:

    Backend backenddatabase.railway.internal not accessible

  • PgBouncer continues logging:

    timeout reached before the port went into state "inuse"

  • backend_database logs have no fresh Postgres readiness/startup output after the redeploy; the latest useful DB log I saw was an old checkpoint around 2026-06-19T13:17:41Z.

  • Railway status payload also reports the production backend_database volume instance currentSizeMB as 0.0, while sibling env DB volumes are around ~1.1GB. Not sure if that is a reporting artifact, but it looks suspicious.

We have tried restarts/redeploys, but the database redeploy appears stuck and PgBouncer cannot reach the internal DB host.

Can Railway inspect backend_database deployment 6ff5ac80-a251-46ef-956c-5c65bb2638bd / instance 3089ae96-500c-462e-99c9-78d25f81362f and confirm whether the Postgres container, attached volume, or private networking/DNS for backenddatabase.railway.internal is stuck? Can you force recover the DB deployment or networking path?

Solved

10 Replies

Status changed to Awaiting Railway Response Railway 18 days ago


andrewgold
PROOP

18 days ago

Update: still down, and we have now tried the self-service recovery paths we can safely try.

Current status:

  • Production health check is still returning 502

  • backend_database latest deployment is still:

    2e6ce1cb-1bf4-4dfa-bbbe-bc4e57dd03f0

  • That deployment appears stuck in the Railway UI at:

    “Deployment in progress: Creating containers…”

  • The UI shows no build logs and no deploy logs for the DB deployment.

  • Postgres logs have no fresh output since 2026-06-19T13:17Z.

  • PgBouncer continues to fail because it cannot reach the Postgres service:

    “Backend backenddatabase.railway.internal not accessible”

    and repeated:

    “timeout reached before the port went into state "inuse"”

  • Direct Railway DB connection still fails:

    railway connect -e production backend_database

    psql: connection to server at "centerbeam.proxy.rlwy.net", port 10304 failed: server closed the connection unexpectedly

What we tried:

  • Restarted services.
  • Aborted the stuck DB redeploy.
  • Retested direct DB connectivity.
  • Redeployed backend_database again.
  • Confirmed backend_app/backend_admin are failing downstream because Prisma cannot reach pgbouncer.railway.internal:6432.
  • We have not detached/deleted/recreated any volumes.

Important observation:

The prior known-good backend_database deployment is still shown as ACTIVE in the Railway UI, but the newer redeploy is stuck in “Creating containers…”. We need Railway to inspect/recover the backend_database deployment/container scheduling/volume attachment/private networking path.

Can someone from Railway please look at backend_database service 45bfdd8c-fe78-4fb6-a9fa-e15d3e829842 in production environment 7396af74-073b-495e-b542-c177f0b68e4d, especially deployment 2e6ce1cb-1bf4-4dfa-bbbe-bc4e57dd03f0?


andrewgold
PROOP

18 days ago

Update as of 2026-06-19T14:46Z:

Production is still down.

Current checks:

  • https://v2.escargot.com/health still returns 502.

  • Direct DB connection still fails:

    railway connect -e production backend_database

    psql: error: connection to server at "centerbeam.proxy.rlwy.net" (66.33.22.245), port 10304 failed: server closed the connection unexpectedly

    This probably means the server terminated abnormally before or while processing the request.

Since the original report:

  • We aborted the stuck backend_database redeploy.
  • We tried a fresh backend_database redeploy.
  • That redeploy became stuck at “Creating containers…” with no build/deploy logs and no fresh Postgres logs.
  • We then rolled back to an older backend_database deployment.

Current backend_database state:

  • service ID: 45bfdd8c-fe78-4fb6-a9fa-e15d3e829842
  • instance ID: 3089ae96-500c-462e-99c9-78d25f81362f
  • current deployment ID: 01f3619c-f9af-4a94-811f-e9b972a9c7c5
  • image: ghcr.io/railwayapp-templates/postgres-ssl:16
  • environment ID: 7396af74-073b-495e-b542-c177f0b68e4d

Even after rollback, the DB is still not reachable. PgBouncer continues to report that it cannot reach backenddatabase.railway.internal and times out waiting for the backend port to become in-use. The database logs still do not show fresh Postgres startup/readiness output after the outage began.

Even the Railway UI cannot connect:

image.png

Attachments


andrewgold

Update as of 2026-06-19T14:46Z: Production is still down. Current checks: - https://v2.escargot.com/health still returns 502. - Direct DB connection still fails: railway connect -e production backend_database psql: error: connection to server at "centerbeam.proxy.rlwy.net" (66.33.22.245), port 10304 failed: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. Since the original report: - We aborted the stuck backend_database redeploy. - We tried a fresh backend_database redeploy. - That redeploy became stuck at “Creating containers…” with no build/deploy logs and no fresh Postgres logs. - We then rolled back to an older backend_database deployment. Current backend_database state: - service ID: 45bfdd8c-fe78-4fb6-a9fa-e15d3e829842 - instance ID: 3089ae96-500c-462e-99c9-78d25f81362f - current deployment ID: 01f3619c-f9af-4a94-811f-e9b972a9c7c5 - image: ghcr.io/railwayapp-templates/postgres-ssl:16 - environment ID: 7396af74-073b-495e-b542-c177f0b68e4d Even after rollback, the DB is still not reachable. PgBouncer continues to report that it cannot reach backenddatabase.railway.internal and times out waiting for the backend port to become in-use. The database logs still do not show fresh Postgres startup/readiness output after the outage began. Even the Railway UI cannot connect: ![image.png](https://station-server.railway.com/attachments/att_01kvg5s6p7fzxv0cqzxv9fsp7c)

aristeufneto
PRO

18 days ago

Same issue over here; multiple reports across central station, discord and x.com and no response from railway anywhere


pjexec
PRO

18 days ago

Same incident here — production Postgres in US East, project luminous-renewal. Down since 13:24 UTC.

Identical signature: Prisma P1001 "Can't reach database server" on the private network (postgres.railway.internal), and the public proxy returns "connection terminated unexpectedly." The Postgres checkpointer still logs but the server accepts no client connections.

Restart + a clean, uninterrupted redeploy are both stuck on "Creating containers" — it can't schedule a container. Looks like the wedged container hasn't released its single-attach volume, so the new one can't mount it. +1 to force-terminating the stuck container / releasing the volume.

That's now multiple customers across Station, Discord, and X with no Railway response for 3+ hours. Happy to DM deployment IDs (stuck redeploy: 23a2f5c0).


zer0stars
PRO

18 days ago

Same issue here. Not resolving.


zer0stars
PRO

18 days ago

Stuck here.

image.png

Attachments


Quick update: the host/hardware failure behind this has been mitigated, and databases that were wedged have been rescheduling onto healthy hosts. The escargot production database is back up on a fresh deployment and serving normally, with data intact (the 0 MB size some of you saw was a dashboard reporting glitch, not data loss). If your database in this thread is still showing stale connection errors, please redeploy it once so it reconnects through the recovered host, then reply here. If any of you are still fully down after a redeploy, reply with your project/service and we'll jump on that specific one immediately. Apologies for the disruption.


Status changed to Awaiting User Response Railway 17 days ago


Sorry for the long silence on this. Confirming you're recovered: backend_database came back at 15:12 UTC yesterday and is healthy, and your data is fully intact (the volume is READY at ~9 GB; the 0B you saw was the wedged container not reporting, not data loss). Root cause was a host failure: the old container hadn't released the single-attach volume, so redeploys hung on "Creating containers" until it rescheduled onto a healthy host. We're hardening that auto-recovery path on our side. For a production database, running HA Postgres (replicas across nodes) would keep you up through a single host failure, and I'm happy to help you set that up. To everyone else who piled onto this thread: you should be recovered too; if your DB is still down, reply with your service ID and we'll get it rescheduled. — Angelo


andrewgold
PROOP

17 days ago

Angelo - thanks for the response, I would appreciate help getting that set up. Let me know the best way to take this forward.


Status changed to Awaiting Railway Response Railway 17 days ago


Glad you're back up. To confirm, backend_database is on a fresh healthy deployment, the volume is READY at ~9 GB, and your data is intact.

For HA Postgres, the path is to deploy our Postgres HA template (a primary plus replicas with automatic failover via repmgr), then cut your app over to it. High level:

  1. Deploy the "Postgres HA" template into your production environment (Create > Template, search Postgres HA).
  2. Restore your current data into the new cluster (pg_dump from backend_database, pg_restore into the HA primary). I can walk you through the exact commands, or we can do a logical replication cutover to minimize downtime.
  3. Point pgbouncer / backend_app at the HA connection string and redeploy.

This keeps you serving through a single host failure, which is exactly what hit you here. If you tell me your preferred maintenance window and whether you want a dump/restore (simple, brief downtime) or a replicated cutover (near zero downtime, more steps), I'll give you the precise runbook for your services. — Angelo


Status changed to Awaiting User Response Railway 15 days ago


Railway
BOT

8 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 8 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...