13 days ago
Hi,
- i am not able to connect postgres via internal network.
- i am getting below message all the time even if i redeploy my service multiple times or restart
"postgres.railway.internal
This private URL will be functional after the next deployment of this service."
- it connects with public URL but railway charges for egress. why should i pay for your bug?
- please resolve the issue ASAP or else dont charge for egress
error logs:
> signalos-whatsapp-ai-saas@1.0.0 db:generate /app
> prisma generate --schema=packages/database/prisma/schema.prisma
Loaded Prisma config from prisma.config.ts.
Prisma schema loaded from packages/database/prisma/schema.prisma.
Generated Prisma Client (v7.8.0) to ./node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.14__@types+_8619248c2409e668e9f86cd42d38c435/node_modules/@prisma/client in 335ms
Start by importing your Prisma Client (See: https://pris.ly/d/importing-client)
Loaded Prisma config from prisma.config.ts.
Prisma schema loaded from packages/database/prisma/schema.prisma.
Datasource "db": PostgreSQL database "railway", schema "public" at "postgres.railway.internal:5432"
Error: P1001: Can't reach database server at postgres.railway.internal:5432
Please make sure your database server is running at postgres.railway.internal:5432.
Build Failed: build daemon returned an error < failed to solve: process "sh -c pnpm install --frozen-lockfile && pnpm db:generate && pnpm prisma migrate deploy --schema=packages/database/prisma/schema.prisma && pnpm --filter @signalos/api build" did not complete successfully: exit code: 1 >
6 Replies
Status changed to Open Railway • 13 days ago
13 days ago
I would recommend moving your migration commands into the pre-deploy commands.
13 days ago
i have migrated using public url and than removed migration command. still issue is same
13 days ago
Running the generation/migration commands in the pre-deploy step still doesn’t fix the private networking issue?
13 days ago
Nope. it doesn't.
13 days ago
it got resolved
anyone facing the same issue i would recommend to follow below steps which helped me to resolve this issue
1. use public database env url. temporarily for migration
2. put migration script in start command
pnpm prisma migrate deploy --schema=packages/database/prisma/schema.prisma
3. deploy the service and once migration is done. rollback to database_url in env and remove public url
4. redeploy application service and database service. now it will connect from internal network
Note: in the private network you might still see "This private URL will be functional after the next deployment of this service." but the connection will work
@railway team please fix this bug
Status changed to Open brody • 11 days ago
Status changed to Solved brody • 11 days ago
