# Prisma P1001: Can't reach database server, explained

> What Prisma error P1001 means, the exact message template, how it differs from P1000/P1002/P1008/P1017, and the real causes: wrong host/port, Docker networking, firewalls, or a paused/suspended database.

Source: https://scribase.com/prisma-p1001-cant-reach-database

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).

## The exact message

Prisma's error reference documents the message template as:

_Prisma's documented template for P1001_

```text
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](https://www.prisma.io/docs/orm/v6/reference/error-reference)

## P1001 vs the other connection error codes

Prisma's common-error codes narrow down exactly where in the connection process things failed:

_Read 2026-11-18 on prisma.io/docs/orm/v6/reference/error-reference_

| 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](https://www.prisma.io/docs/orm/v6/reference/error-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](https://www.prisma.io/docs/orm/v6/reference/error-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](https://scribase.com/pricing)

## FAQ

**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.

## Related

- [Check a connection string](https://scribase.com/tools/connection-string)
- [Supabase too many connections](https://scribase.com/supabase-too-many-connections)
- [Neon too many connections](https://scribase.com/neon-too-many-connections)
- [Postgres error codes](https://scribase.com/postgres-errors)
- [Free Postgres hosting compared](https://scribase.com/free-postgres-hosting)