title: Why are all my Mongoose requests timing out?
body: <p>My Mongoose requests have all been timing out since yesterday.</p>
  <p>My internet connection is working well, the same as usual, and my source code is unchanged.</p>
  <p>So, I think it must be a problem with my dependencies or with MongoDB itself.</p>
  <p><strong>Minimal reproducible example:</strong></p>
  <pre><code>const mongoose = require('mongoose')
  
  
  const mongoURL = //replace this comment with your own Mongo URL
  
  mongoose.connect(mongoURL, { 
    useNewUrlParser: true, 
    useUnifiedTopology: true, 
    useFindAndModify: false, 
    useCreateIndex: true 
  })
  
  const exampleSchema = new mongoose.Schema({
    title: String,
    author: String
  })
  
  const Example = mongoose.model('Example', exampleSchema)
  
  const exampleOne = new Example({
    title: 'Don Quixote',
    author: 'M. Cervantes'
  })
  
  exampleOne.save().then(res =&gt; console.log(res))
  
  mongoose.connection.close()
  </code></pre>
  <p><strong>Full error trace from running the above example:</strong></p>
  <pre><code>(node:18284) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
  (Use `node --trace-warnings ...` to show where the warning was created)
  (node:18284) UnhandledPromiseRejectionWarning: MongooseError: Operation `examples.insertOne()` buffering timed out after 10000ms
      at Timeout.&lt;anonymous&gt; (G:\Programming\Courses\Fullstack-Helsinki-2020\mongo_testing\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:185:20)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7)
  (node:18284) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
  (node:18284) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  (node:18284) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.
  </code></pre>
  <p><strong>My current Mongoose and MongoDB versions (from package.json):</strong></p>
  <pre><code>&quot;mongoose&quot;: {
        &quot;version&quot;: &quot;5.11.16&quot;,
        &quot;resolved&quot;: &quot;https://registry.npmjs.org/mongoose/-/mongoose-5.11.16.tgz&quot;,
        &quot;integrity&quot;: &quot;sha512-qmolyGAskPuq0Xr3j2Tjm9jwRccGGnLRWtTuyRvYBZoyItajwIoQdetJH8oVzs3N7aZK/GKZ82xV/t97suF8Pg==&quot;,
        &quot;requires&quot;: {
          &quot;@types/mongodb&quot;: &quot;^3.5.27&quot;,
          &quot;bson&quot;: &quot;^1.1.4&quot;,
          &quot;kareem&quot;: &quot;2.3.2&quot;,
          &quot;mongodb&quot;: &quot;3.6.4&quot;,
          &quot;mongoose-legacy-pluralize&quot;: &quot;1.0.2&quot;,
          &quot;mpath&quot;: &quot;0.8.3&quot;,
          &quot;mquery&quot;: &quot;3.2.4&quot;,
          &quot;ms&quot;: &quot;2.1.2&quot;,
          &quot;regexp-clone&quot;: &quot;1.0.0&quot;,
          &quot;safe-buffer&quot;: &quot;5.2.1&quot;,
          &quot;sift&quot;: &quot;7.0.1&quot;,
          &quot;sliced&quot;: &quot;1.0.1&quot;
        },
        &quot;dependencies&quot;: {
          &quot;mongodb&quot;: {
            &quot;version&quot;: &quot;3.6.4&quot;,
            &quot;resolved&quot;: &quot;https://registry.npmjs.org/mongodb/-/mongodb-3.6.4.tgz&quot;,
            &quot;integrity&quot;: &quot;sha512-Y+Ki9iXE9jI+n9bVtbTOOdK0B95d6wVGSucwtBkvQ+HIvVdTCfpVRp01FDC24uhC/Q2WXQ8Lpq3/zwtB5Op9Qw==&quot;,
            &quot;requires&quot;: {
              &quot;bl&quot;: &quot;^2.2.1&quot;,
              &quot;bson&quot;: &quot;^1.1.4&quot;,
              &quot;denque&quot;: &quot;^1.4.1&quot;,
              &quot;require_optional&quot;: &quot;^1.0.1&quot;,
              &quot;safe-buffer&quot;: &quot;^5.1.2&quot;,
              &quot;saslprep&quot;: &quot;^1.0.0&quot;
            }
          },
          &quot;safe-buffer&quot;: {
            &quot;version&quot;: &quot;5.2.1&quot;,
            &quot;resolved&quot;: &quot;https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz&quot;,
            &quot;integrity&quot;: &quot;sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==&quot;
          }
        }
      
  </code></pre>
  <p><strong>Question:</strong> Why is the above example raising the above error, and, in general, why have my Mongoose requests all been timing out?</p>