title: "Error: MongooseError: Operation `users.insertOne()` buffering timed out after 10000ms",
body: <p>I'm running MongoDB Atlas on node express and I got this error when I tested with postman.</p>
  <pre><code>const express = require('express');
  const cors = require('cors');
  const mongoose = require('mongoose');
  
  require('dotenv').config();
  
  const app = express();
  const port = process.env.PORT || 5000;
  
  app.use(cors());
  app.use(express.json());
  
  const uri = process.env.ATLAS_URI;
  mongoose.connect(uri, { useNewUrlParser: true, useCreateIndex: true }
  );
  const connection = mongoose.connection;
  connection.once('open', () =&gt; {
    console.log(&quot;MongoDB database connection established successfully&quot;);
  })
  
  const exercisesRouter = require('./routes/exercises');
  const usersRouter = require('./routes/users');
  
  app.use('/exercises', exercisesRouter);
  app.use('/users', usersRouter);
  
  app.listen(port, () =&gt; {
      console.log(`Server is running on port: ${port}`);
  });
  </code></pre>
  <p>This is my <code>.env</code>, I'm guessing the problem might be here too, Kindly help:</p>
  <pre><code>ATLAS_URI=mongodb+srv://userone:useronepassword1234@cluster0.swye5.mongodb.net/&lt;dbname&gt;?retryWrites=true&amp;w=majority
  </code></pre>