Prisma error P1001: can't reach database server
P1001 means Prisma could not open a network connection to the host and port in your database URL at all — it never got far enough to try a username or password. That is different from P1000 (reached the server, credentials rejected) or P1002 (reached the server, then it timed out).
Last checked November 18, 2026.
The exact message
Prisma's error reference documents the message template as:
Can't reach database server at `{database_host}`:`{database_port}`
Please make sure your database server is running at `{database_host}`:`{database_port}`.Sources: Prisma: Error message reference
P1001 vs the other connection error codes
Prisma's common-error codes narrow down exactly where in the connection process things failed:
| Code | Meaning |
|---|---|
| P1000 | Reached the server; the credentials for the given user are not valid. |
| P1001 | Could not reach the server at all — no response from the host:port. |
| P1002 | Reached the server, but it timed out. |
| P1008 | An operation (not the initial connection) timed out. |
| P1010 | Reached the server; the user was denied access to that specific database. |
| P1011 | Reached the server; opening a TLS connection failed. |
| P1017 | Was connected, then the server closed the connection. |
Sources: Prisma: Error message reference
The real causes, most common first
- The database is not running, or is paused/suspended by the host (a Neon compute that scaled to zero wakes on the next query rather than refusing it, but a genuinely suspended free-tier database on some hosts will not). Check the host's own dashboard before assuming a network problem.
- Wrong host or port in DATABASE_URL — a copy-paste from the wrong environment, or a pooler port (6543) used where the direct port (5432) was needed, or vice versa.
- Docker networking: using localhost inside a container that needs the host's service name instead (host.docker.internal on Docker Desktop, or the compose service name on a shared network).
- A firewall, VPC/security-group rule, or an IP allow-list on the database that does not include the machine or platform running Prisma (common right after deploying to a new hosting provider).
- IPv6-only resolution for a host that the running environment cannot reach over IPv6 — use the IPv4-compatible pooler hostname where the host provides one.
Sources: Prisma: Error message reference
Using Prisma against Scribase
Scribase exposes a pooled Postgres connection string from the console for exactly this: point DATABASE_URL at it and Prisma connects the same way it would to any hosted Postgres. Direct (unpooled) connections on 5432/6543 are not open from the internet yet, so a Prisma config that explicitly expects a direct connection URL needs the pooled one instead.
Sources: Scribase pricing
Questions people ask
What is the difference between P1000 and P1001?
P1000 means Prisma reached the database server and the server rejected the username or password. P1001 means Prisma never got a response from the host and port at all — it is a network-reachability failure, not a credentials failure.
Why does P1001 only happen sometimes?
A database that pauses or suspends when idle (common on free tiers) can refuse a connection attempt during the moment it is waking up, which looks identical to P1001 from Prisma's side. Retrying after a few seconds, or checking the host's own status page, tells you which case you are in.
I see P1001 only inside Docker — why?
A DATABASE_URL with localhost or 127.0.0.1 refers to the container itself, not the host machine or another container. Use host.docker.internal (Docker Desktop) or the service name from your compose file on a shared Docker network instead.
Does Scribase work with Prisma?
Yes, via the pooled Postgres connection string from the Scribase console; it connects the same way Prisma connects to any hosted Postgres database.