Error Message from MongoDB "Operation `disneys.insertOne()` buffering timed out after 10000ms"" Error Message from MongoDB "Operation `disneys.insertOne()` buffering timed out after 10000ms"" express express

Error Message from MongoDB "Operation `disneys.insertOne()` buffering timed out after 10000ms""


try this outHow to solve Mongoose v5.11.0 model.find() error: Operation `products.find()` buffering timed out after 10000ms"

Also, your API call seem to have a problem, It should be disneyCharacters instead of disneyCharacter.

Also, probably setup a local database first instead of using process.env.DATABASE_URL.


Actually i was also getting the same error.steps i performed to solve this error are

while creating database in mongodb

  1. allow access from anywhere (ip configuration)
  2. choose the nearest server

this solved my problems :)


In my application the same error message was thrown.The difference is, that I am using MongoDB Atlas, instead of a local MongoDB.

Solution:After added "+srv" to the URL scheme is issue was gone:

const mongoose = require("mongoose");mongoose.set('useUnifiedTopology', true);mongoose.set('useNewUrlParser', true);mongoose.connect("mongodb+srv://user:password@host/dbname").then( () => console.log("connected to DB.")).catch( err => console.log(err));

Dependencies in package.json:

"dependencies": {"mongoose": "^5.11.12",}

MongoDB Version 4.2.11

The connection string is given in the MongoDB Atlas frontend: -> Data Storage -> Cluster -> connect -> Connect your application

There you can find some code snippets.