19 days ago
Project: fabric-moments-poc-20260802
Environment: production
Web service: fabric-moments-web
Postgres service: Postgres
The Web and Postgres services are in the same production environment and us-east4 region. Postgres is healthy and ready on 5432 over IPv4/IPv6. Web starts, then its migration entry point cannot establish the private Postgres connection; the 300-second health check fails after 11 attempts.
During the failed Web deployment, Web network-flow telemetry showed zero TCP egress observations and Postgres logs showed no connection observation from Web. An earlier control run of the exact migration command completed in about 10 seconds using a temporary public Postgres URL. A later single read-only probe through a newly created public TCP proxy with sslmode=require did not receive a database response; the proxy was removed immediately. Web DATABASE_URL was not changed and Web was not redeployed after that failed probe.
Postgres and Web were each redeployed once before the public TLS probe; private-network behavior was unchanged. Worker and Cleanup have never been deployed. Please inspect private DNS resolution, private endpoint attachment, TCP egress for the Web replica, and whether any account or project networking condition could explain the inconsistent public transport results.
No credentials, database URLs, or raw sensitive logs are included.
3 Replies
19 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 19 days ago
19 days ago
Are you running the migration during the build phase?
If so, then you'll need to migrate it to the pre-deploy phase, as private networking isn't available during the build phase, and only during the deploy phase.
19 days ago
Thanks. The migration is not running during the build phase.
- The Docker build runs only npm run build.
- The latest service manifest has buildCommand: null, preDeployCommand: null, and deploy startCommand: npm run migrate && npm run start.
- Deployment logs show Starting Container, then > migrate and tsx scripts/migrate.ts.
So the migration starts in the deploy/runtime container before Next.js starts. It then waits for Postgres, while Web network-flow telemetry records zero TCP egress and Postgres records no connection from Web. Postgres is healthy in the same environment and region.
Could you please inspect private DNS resolution, private endpoint attachment, or why the Web replica emits no database traffic during deploy?
19 days ago
Try logging info throughout the migration script to see where it's stopping or crashing.