Skip to content

Prisma P1001 failure on dual-stack Neon host: IPv6 ENETUNREACH in Railway container #907

Description

@yasinkocak

Bug Description

Prisma migrations fail with P1001 when targeting a dual-stack Neon direct host in the Railway environment. Railway containers appear unable to route IPv6 traffic to the Neon host, and Prisma fails to fall back to IPv4.

Evidence

  • Environment: Railway service with running (Prisma 7.8.0).
  • Target: Neon direct host .
  • Logs: Env check OK for DATABASE_URL and DIRECT_URL. Prisma loads prisma.config.ts. Host resolves to the Neon direct host.
  • Connectivity Check (inside Railway SSH):
    • DNS lookup for the Neon host returns both IPv4 and IPv6 addresses.
    • Manual TCP connect to all IPv4 addresses on port 5432 succeeds.
    • Manual TCP connect to all IPv6 addresses fails immediately with ENETUNREACH.
  • Failure: node prisma migrate status fails with P1001 against the host in this environment.

Reproduction

  1. Deploy a service on Railway.
  2. Configure DIRECT_URL to a dual-stack Neon direct host (e.g., ep-twilight-violet-abrhe2ph.eu-west-2.aws.neon.tech).
  3. Run prisma migrate status or prisma migrate deploy during build/pre-deploy.
  4. Observe P1001 error despite IPv4 connectivity being functional.

Expected Behavior

Railway containers should either have functional IPv6 routing to dual-stack hosts, or Prisma should successfully fallback to the reachable IPv4 addresses when IPv6 returns ENETUNREACH.

Actual Behavior

Prisma fails with P1001 because it likely attempts IPv6 (returned by DNS), which fails with ENETUNREACH in the Railway container, and it does not recover via IPv4.

Note: If this is a platform/runtime networking issue rather than a CLI issue, please redirect this to the appropriate internal tracker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions