Error that hasn't been happening before (started 2 days ago)
See original GitHub issueI’ve been having this error pop up on me recently :
MongooseError: Operation importantids.findOne()
buffering timed out after 10000ms
at Timeout.<anonymous> (/root/disgo/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:198:23)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)
I successfully connect to the database and interact with it in my app, but recently, it keeps doing that error at random times and will not stop until I restart the app.
Mongoose version : 5.13.7 (won’t update using npm update)
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Common IRS Where's My Refund Questions and Errors
If you have EITC or ACTC, it didn't even start processing until after 2/15. If you were missing documents (or the IRS was),...
Read more >CARE CODE: 205.2 [LU003] Error keeps happening on my ...
A previous post a response said the issue was corrected. It hasn't been corrected. Is the only resolution changing my password?
Read more >How to Fix Meta Facebook Pixel Errors and Test Your Events
The Meta Facebook Pixel is a piece of code that you can install on your website to track the different kinds of actions...
Read more >iCloud for Mac is stuck on "waiting to upload" - Apple Developer
To work around problem, I noticed that any edit (to the file that fails to upload) will solve the problem.
Read more >Directory synchronization to Azure Active Directory stops or ...
Describes a performance problem in Azure Active Directory Sync Tool. The tool either stops syncing or reports that sync hasn't run in more ......
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 Free
Top 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
I took a closer look and I don’t see anything to indicate this is anything other than a case of replica set hostname inconsistency, which is documented and expected behavior in the MongoDB Node driver. You need to make sure that the self-reported
hostname
on the machine that’s hosting your MongoDB server is resolvable from your application server.Can second this. For me the issue seems to be that the new mongoose version (we are using 6.1.6) tries to resolve the replica set hostname by itself and throws
getaddrinfo ENOTFOUND mongod-0
(mongod-0 is resolvable from the mongodb server, but not from connecting client). However previous versions and mongosh connects fine. It can not connect and so buffered operations fail with timeout.Fixed by setting
directConnection: true
in mongoose connection options like so. It feels like previous versions potentially had the connection default to direct connect or something similar?