Service crashing after migrating project to workspace (Prisma P1001)
bystartupgit
PROOP

3 months ago

Hi,

After migrating my project to a Railway Workspace, my API service started crashing in a loop.

Project ID: 279bc908-0b23-4ea1-a3b7-98cae64c65f9

Before the migration, everything was working correctly.

Current behavior

Build succeeds normally.

The service starts.

During startup, it runs npx prisma migrate deploy.

Prisma throws the following error:

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

The container exits.

Railway restarts it.

The crash loop continues.

Stack

Node.js API

Prisma ORM

Railway Postgres (same project)

DATABASE_URL is set as a reference to Postgres

Environment configuration

DATABASE_URL is configured as:

${{Postgres.DATABASE_URL}}

The Postgres service shows:

Deployment Online

Required Variables OK

No changes were made to the database service itself — only the repository was migrated into a workspace.

Even after rolling back to a previously working commit, the issue persists.

Additional details

The API and Postgres are in the same Railway project.

The start command is:

npx prisma migrate deploy && node dist/src/server.js

It appears that after migrating to a workspace, the internal hostname postgres.railway.internal is no longer reachable from the service.

Could this be related to networking changes when moving to a workspace?

Closed

2 Replies

Dupe...?


3 months ago

Yep, please avoid creating duplicate threads.


Status changed to Closed brody 3 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...