-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error that hasn't been happening before (started 2 days ago) #11200
Comments
Not enough information for us to repro. Please provide a code sample that demonstrates this issue. |
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 Fixed by setting const connectionPromise = mongoose.connect(mongoUrl, {
directConnection: true,
}); |
I think I can provide more info on this I have a replica set configured on my raspberry pi, on a different machine, the rs was initiated using: rs.initiate({
_id : "rs0",
members: [
{ _id: 0, host: "127.0.0.1:27017" },
]
}) On mongodb 5.13.14, the last from major 5, the
I've tested on the same repositório, only changing from 5.13.14, 6.0 and 6.1.6 (latest) Hope it helps |
@fakelag take a look at the docs on replica set hostnames. The "tries to resolve the replica set hostname by itself" behavior is definitely not new in 6.1.6, we've had that behavior since 5.13 at least, if you had @GCastilho sounds like you where running with |
We have had After upgrading, we also do not supply |
I also encountered the same problem when upgrading from version 5.13.8 to version 6.0.0. Has the problem been resolved? |
I also encountered the same problem when upgrading from version 5.13.8 to version 6.0.0. Has the problem been resolved? |
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 |
…or message and info about `err.reason.servers` Fix #11200
I've been having this error pop up on me recently :
MongooseError: Operation
importantids.findOne()
buffering timed out after 10000msat Timeout. (/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)
The text was updated successfully, but these errors were encountered: