Posts

Showing posts with the label mongoDB

Solved : MongooseError: Operation `files.insertOne()` buffering timed out after 10000ms

Error : while connecting or inserting Data in MongoDB atlas Guys i have found a error when connecting to MongoDB atlas cloud. when i'm connecting to mongodb than my code is blow :   async function connectDB (){   try {     await mongoose . connect ( process . env . dbUrl ,() => console . log ( " Mongoose is connected" ),   );   } catch ( e ){     console . log ( e )   When we use above code than that is display : Mongoose is connected . b ut, when i want to insert document to mongoDB atlas cloud than showing a error like this : const err = new MongooseError(message); ^ MongooseError: Operation `files.insertOne()` buffering timed out after 10000ms at Timeout.<anonymous> (D:\expressJsBySujeet\fileShareBackend\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:151:23) if you want to don't see Like that error than use this two code :     useNewUrlParser : true , ...