title: Error: timeout when connecting to MongoDb Atlas using mongoose
body: <p>I'm trying to connect my mongoose with my MongoDB Atlas Cluster,it shows that i have a connection with the database but i can't save , and that erreur :const err = new MongooseError(message);
  ^</p>
  <p>MongooseError: Operation <code>users.insertOne()</code> buffering timed out after 10000ms</p>
  <p>i already try to change my DNS and selecting the version to &quot;2.2.12&quot; by the drop-down menu</p>
  <pre><code>const express = require(&quot;express&quot;);
  const mongoose = require(&quot;mongoose&quot;);
  
  
  const app = express();
  require(&quot;dotenv&quot;).config({ path: '.env' });
  
  app.get(&quot;/&quot;, (req, res) =&gt; res.send(&quot;Server is up and running&quot;));
  
  const PORT = process.env.PORT || 5000;
  app.listen(PORT, () =&gt; console.log(`Server is running on port ${PORT}`));
  
  
  mongoose.connect(
  process.env.MONGO_PROD_URI, {
   useNewUrlParser: true,
   useUnifiedTopology: true,
   useCreateIndex: true,
  }
  ,() =&gt; console.log(&quot;Database connected!&quot;));
  
  const UserSchema = new mongoose.Schema({
   name: String,
   age: Number,
   isAdult: Boolean,
   joined: {
     type: Date,
     default: Date.now,
   },
  });
  
  const User = mongoose.model(&quot;users&quot;, UserSchema);
  
  const newUser =  new User({
   name: &quot;Elliot Alderson&quot;,
   age: 23,
   isAdult: true,
  });
  
  newUser.save().then(() =&gt; console.log(&quot;Saved new user&quot;));
  
  
  
  </code></pre>