Prisma MongoDB - Connection timeout problem.
See original GitHub issueBug description
Hi, I’m using Prisma with MongoDB Atlas. I deployed my project with Heroku and if someone didn’t visit my website for a while. My prisma apollo queries causes a problem because of prisma mongodb query inside of it.
For example: I visited the website and I saw error, I refresh the page and then error gone. After a few hours I revisited the website again I saw error after refresh the page the error gone.
A image while try to login:
https://i.ibb.co/dgXrWsb/IMG-2387.jpg
My connection url:
DATABASE_URL=“mongodb+srv://<user>:<pass>@serverlessinstance0.mongodb.net/<dbName>”
How to reproduce
Expected behavior
Connection shouldn’t be closed even though no one request any query. At least they shouldn’t see a error page.
Prisma information
Environment & setup
- OS:
- Database:
- Node.js version:
Prisma Version
prisma: 3.13.0
@prisma/client: 3.13.0
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Connection to database timed out - Prisma
The error Connection your database timed out appears when you use Data Browser or Query Console. Cause. When you use Data Browser or...
Read more >MongoDB connection error: MongoTimeoutError: Server ...
just go to mongodb atlas admin panel.Go in security tab>Network Access> Then whitelist your IP by adding it.
Read more >Server selection error: server selection timeout, current topology
I'm trying to connect to via my code in golang. I am using the mongo-driver module. I am able to connect to instance: ......
Read more >Prisma 3.12.0 Release - GitClear
test: use 1_000 notation for timeout + fix db pull timeout for CI ... For newcomers to Prisma with MongoDB, we recommend you...
Read more >any suggestions about what to do with this error Transaction
I'm using 3.14.0 I increased timeouts and these queries generally take ... all existing connections with database, and on the subsequent request prisma...
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
The query you are trying to execute probably just takes longer than these 10s (including the creation of the database connection). I suggest you open a new discussion in this repository so we can discuss this and ask all teh questions - in an existing and closed issue that is not really appropriate as it notifies all the previous participants of the discussion on each comment.
hey @casperibo, I also experience this issue while using Prisma 3 (3.15.2 precisely), also using MongoDB Atlas
I just upgraded it to the latest version (4.3.1), which seems to resolve the issue 🤞