Error: P1002 database server was reached but timed out

See original GitHub issue

Bug description

I was running prisma migrate dev and ran into this error.

Error: P1002

The database server at `xx.xx.xx.xx`:`5432` was reached but timed out.

Please try again.

Please make sure your database server is running at `xx.xx.xx.xx`:`5432`.

I’m not using pgBouncer. This is my connection string: postgres://<XXXXXXXXXX>/defaultdb?connection_limit=3&connection_timeout=30&pool_timeout=30

I looked at #6053

How to reproduce

This is a random error.

Expected behavior

Primsa migrate happens as expected

Prisma information

Environment & setup

  • OS: Mac OS 10.15.7
  • Database: Postgres
  • Node.js version: 15.14.0
  • Prisma version:
prisma               : 2.21.2
@prisma/client       : 2.21.2
Current platform     : darwin
Query Engine         : query-engine e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/@prisma/engines/query-engine-darwin)
Migration Engine     : migration-engine-cli e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary        : prisma-fmt e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : e421996c87d5f3c8f7eeadd502d4ad402c89464d
Studio               : 0.371.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
ChukaEbicommented, May 3, 2021

@janpio I am running npx prisma migrate dev and I expected it to just add a uniqueness constraint to an existing field in a table.

0reactions
janpiocommented, Oct 24, 2022

@gregorcee123 @matt-development-work Are you also using migrate dev when you get this? If not, please open a new issue and provide all the information you have so we can understand better. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message reference - Prisma
P1002. "The database server at {database_host} : {database_port} was reached but timed out. Please try again. Please make sure your database server is ......
Read more >
prisma Error: p1001: Can't reach database server at `db ...
Adding the connection_timeout sadly didn't help still timed out. It works if I connect using the cli mysql or pscale but if I...
Read more >
Can't reach database server in FRA - Build debugging - Fly.io
... fra [info]Error: Can't reach database server at `fra.top2.neares… ... deployment multiple times, using two different db FQDNs, but both ...
Read more >
Help wanted: Error: P1001: Can't reach database server at "db ...
Hi all, I'm starting a new project and going through the docs to use supabase + prisma + React but despite following the...
Read more >
Are you running into Postgres connection issues on Azure?
Scenario: You have just provisioned a server in Azure Database for PostgreSQL - Single Server, but the connection fails.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found