prisma: Connections from repl.it repls randomly failing with various errors
Bug description
Prisma connections from a lot of my repl.it repls randomly fail with various errors due to unknown reasons.
Here are the errors I’ve seen (Descending order of frequency):
[ERROR] :
Invalid `prisma.workspace.findUnique()` invocation:
Can't reach database server at `ec2-50-19-32-202.compute-1.amazonaws.com`:`5432`
Please make sure your database server is running at `ec2-50-19-32-202.compute-1.amazonaws.com`:`5432`.
Invalid `prisma.workspace.findUnique()` invocation:
Error creating a database connection. (Operation timed out (mobc timeout))
at new AuthorizationError (/home/runner/InfoBot-old-2/node_modules/@slack/oauth/dist/errors.js:71:28)
at InstallProvider.<anonymous> (/home/runner/InfoBot-old-2/node_modules/@slack/oauth/dist/index.js:158:31)
at step (/home/runner/InfoBot-old-2/node_modules/@slack/oauth/dist/index.js:44:23)
at Object.throw (/home/runner/InfoBot-old-2/node_modules/@slack/oauth/dist/index.js:25:53)
at rejected (/home/runner/InfoBot-old-2/node_modules/@slack/oauth/dist/index.js:17:65)
Invalid `prisma.channel.upsert()` invocation:
Timed out fetching a new connection from the pool. Please consider reducing the number of requests or increasing the `connection_limit` parameter (https://www.prisma.io/docs/concepts/components/prisma-client/connection-management#connection-pool). Current limit: 5, amount of connections currently in use: 0.
at Object.asCodedError (/home/runner/HackClubKarma/node_modules/@slack/bolt/dist/errors.js:23:12)
at App.handleError (/home/runner/HackClubKarma/node_modules/@slack/bolt/dist/App.js:442:43)
at App.processEvent (/home/runner/HackClubKarma/node_modules/@slack/bolt/dist/App.js:435:25)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Note
I’ve already spoken to folks at repl.it and @nikolasburk – here’s some context:
How to reproduce
Not always reproducible. Occurs randomly and can only fixed by creating a fresh copy of (forking) the repl
Affected repls:
- https://repl.it/@KhushrajRathod/InfoBot-old-3
- https://repl.it/@KhushrajRathod/InfoBot-old-2
- https://repl.it/@KhushrajRathod/InfoBot-old
- https://repl.it/@KhushrajRathod/LightningDelete-old
- https://repl.it/@KhushrajRathod/The-Overseer-Frontend
Expected behavior
- Prisma can connect to the database (since it works locally and via
psql
)
Prisma information
datasource db {
url = env("DATABASE_URL")
provider = "postgresql"
}
generator client {
provider = "prisma-client-js"
}
model Workspace {
id String @id
installation String
}
Environment & setup
- OS: Linux
- Database: PostgreSQL
- Node.js version: v12.16.1
- Prisma version: 2.14.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (9 by maintainers)
Hi, I’ll surely try that but I’m not sure how long it will take to know if the problem is solved, since the issue randomly reproduces