Repository navigation
Prisma 7.10.1 Schema Engine returns P1001 on Windows, but PostgreSQL driver connects successfully #30879
Replies: 2 comments
|
The reason you're seeing this discrepancy comes down to Prisma 7's architecture: runtime queries and CLI schema operations use two completely different networking and TLS stacks under the hood. 1. Why
|
|
The error code narrows this down quite a bit. In Prisma 7.10.1, What P1001 does and doesn't mean In the engine's error mapping (quaint
So a certificate-store problem would normally show up as P1011, not P1001. P1001 means the binary either couldn't open the TCP connection or didn't finish connecting within the timeout. Things to check, given that
Seeing the underlying error without leaking credentials The CLI pipes the engine's stderr into the $env:DEBUG = "prisma:schemaEngine:stderr"
$env:RUST_LOG = "debug"
npx prisma migrate statusUsing that one namespace instead of Applying your migrations in the meantime
DATABASE_URL_UNPOOLED="postgresql://...?sslmode=require&connect_timeout=30" npx prisma migrate deployI'd avoid running the |
Uh oh!
There was an error while loading. Please reload this page.
Prisma 7.10.1 Schema Engine returns P1001 on Windows, but PostgreSQL driver connects successfully
Hello Prisma team,
I'm troubleshooting a connection issue between Prisma ORM and a fresh Neon PostgreSQL database. I need help identifying why Prisma's native Schema Engine cannot connect when the PostgreSQL driver and Prisma adapter can connect successfully.
Environment
@prisma/adapter-pg: 7.10.1pg: 8.23.1public, currently emptyWhat works
pgdriver.pg.@prisma/adapter-pg, including a successfulSELECT current_database()query.npx prisma validate.What fails
Both commands return
P1001:The failure persists with both direct and pooled Neon endpoints, after trying a longer connection timeout, removing
channel_binding=require, changing SSL mode, preferring IPv4, and upgrading Prisma packages from 7.10.0 to 7.10.1.Prisma 7 configuration
prisma.config.ts:prisma/schema.prisma:The Schema Engine executable starts and reports its version correctly. No migrations have been applied to the fresh database.
Questions
P1001whenpgand@prisma/adapter-pgconnect successfully from the same Windows machine?I want to use Prisma's existing migration history to initialize the fresh database without modifying production data.
Thank you.
All reactions