Unable to establish a connection once database recovers
See original GitHub issueBug description
If the initial request is sent while database connection cannot be established, all subsequent request will result in failures.
Steps reproduction
- Take down database
- Initiate request
prisma.$queryRaw
(FAILS) - Bring up database
- Initiate request
prisma.$queryRaw
(FAILS)
Both requests fail with
Can't reach database server at xxxx:xxx
prisma:client:libraryEngine sending request, this.libraryStarted: false +5s
prisma:client:libraryEngine library starting +0ms
prisma:info Starting a postgresql pool with 21 connections.
prisma:client:libraryEngine sending request, this.libraryStarted: false +7s
prisma:client:libraryEngine library already starting, this.libraryStarted: false +0ms
Expected Behavior
- Take down database
- Initiate request
prisma.$queryRaw
(FAILS) - Bring up database
- Initiate request
prisma.$queryRaw
(PASSES)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How To Fix The Error Establishing A Database Connection In ...
Open MySQL Databases: Go to your cPanel and scroll down to your database section. Click MySQL Database. Initiate Database Repair: Scroll to the ......
Read more >Recover from a CLOUD-0005 - Oracle Help Center
Using the Oracle Database Cloud Service Adapter with Oracle Integration Generation 2 ... Recover from a CLOUD-0005: Unable to Establish Connection Error.
Read more >Failing to connect to Database due to database in recovery
If so, whilst the Secondary server is being restored you will be unable to establish connections to the database.
Read more >The connection is broken and recovery is not possible - MSDN
According to the error message, probably the remote server is shut down, or SQL Server Database Engine service is down, or a new...
Read more >[Error Solved] SQL Database Restore failed, database in use
When attempting to restore SQL Server db, make sure there are no active connections. If someone is using the database, the restore operation ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We know that this is not related to the recent connection pool load issue, but generally could have been caused by the same code (connection pool). The PR makes it look like a different, TS Library Engine implementation problem. This has still to be understood and confirmed.
Note: See PR and the comments there https://github.com/prisma/prisma/pull/12066