-
-
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
Improve stack traces for MongoErrors #8259
Comments
Happens to me as well with same version of mongoose, |
This error generally occurs when you lose connectivity to the database. Can you clarify whether you're connecting to a standalone mongodb instance, replica set, sharded cluster, or MongoDB Atlas? And are there any connectivity issues, server resets, etc. around the time when you experience this issue? |
Hello, I'm connecting against a mongoDB replica set. Someone peculiar is that multiple apps share the same connection string (using the same kubernetes secret) and they use the same mongoose version and connection settings, however only one of them is getting this error. |
Hello, I've experienced the exact same error with Mongoose 5.7.5, that occurs 3 times over the past two weeks in my production env. I connect to Mongo Atlas. The worst thing is that the error trace does not provide any insight about where it happened if it comes to Mongoose, the way I start the driver or elsewhere...
|
I'm not using mongoose, just the raw mongo driver (3.2.2), with Atlas. I do seem to be seeing this a lot in the last couple of weeks. Just in case it's useful. |
@antony Did you see that error too?
|
@blasterbug Yeah - that and one about topology sometimes. |
Hello, this is happening to me too, the two errors that seem to repeat are:
I have many services connected to the same cluster (on Mongo Atlas) but only one of them get these errors sometimes, a couple of time this month The only guess I have is that this service is the only one using the |
I have the same issue, will subscribe to this one. |
Do you want to request a feature or report a bug?
Bug
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
"mongoose": "5.7.1",
What is the current behavior?
I randomly get this error below
the connection code uses these settings:
any recommendations ?
MongoError: server instance pool was destroyed
at basicWriteValidations (/dist/node_modules/mongodb/lib/core/sdam/server.js:388:12)
at executeWriteOperation (/dist/node_modules/mongodb/lib/core/sdam/server.js:415:17)
at Server.insert (/dist/node_modules/mongodb/lib/core/sdam/server.js:337:5)
at topology.selectServer (/dist/node_modules/mongodb/lib/core/sdam/topology.js:998:15)
at selectServers (/dist/node_modules/mongodb/lib/core/sdam/topology.js:394:9)
at selectServers (/dist/node_modules/mongodb/lib/core/sdam/topology.js:816:12)
at NativeTopology.selectServer (/dist/node_modules/mongodb/lib/core/sdam/topology.js:381:5)
at executeWriteOperation (/dist/node_modules/mongodb/lib/core/sdam/topology.js:966:12)
at NativeTopology.insert (/dist/node_modules/mongodb/lib/core/sdam/topology.js:535:5)
at NativeTopology.insert (/dist/node_modules/mongodb/lib/topologies/native_topology.js:58:11)
at insertDocuments (/dist/node_modules/mongodb/lib/operations/common_functions.js:260:19)
at InsertOneOperation.execute (/dist/node_modules/mongodb/lib/operations/insert_one.js:26:5)
at executeOperation (/dist/node_modules/mongodb/lib/operations/execute_operation.js:83:26)
at Collection.insertOne (/dist/node_modules/mongodb/lib/collection.js:476:10)
at NativeCollection.(anonymous function) [as insertOne] (/dist/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:166:28)
at model.Model.$__handleSave (/dist/node_modules/mongoose/lib/model.js:262:33)
at model.Model.$__save (/dist/node_modules/mongoose/lib/model.js:320:8)
at /dist/node_modules/kareem/index.js:278:20
at _next (/dist/node_modules/kareem/index.js:102:16)
at process.nextTick (/dist/node_modules/kareem/index.js:507:38)
at process._tickCallback (internal/process/next_tick.js:61:11)
The text was updated successfully, but these errors were encountered: