title: Error Message from MongoDB "Operation `disneys.insertOne()` buffering timed out after 10000ms""
body: <p>I'm currently creating a new API with MongoDB and Express, and I'm currently having this issue &quot;Operation disneys.insertOne() buffering timed out after 10000ms.&quot; I'm currently using route.rest to test my API.</p>
  <p>However, I don't know what I'm currently doing wrong, could someone take a look at my <a href="https://github.com/hvaandres/RestAPI_Mongoose_Node" rel="noreferrer">Github Repository</a> ?</p>
  <p>This is the way that I setup my API calls:</p>
  <pre><code>
  const express = require(&quot;express&quot;);
  const router = express.Router();
  const Disney = require(&quot;../models/disneyCharacter&quot;);
  
  // Getting all character
  
  router.get(&quot;/&quot;, async (req, res) =&gt; {
    try {
      const character = await Disney.find();
      res.json(character);
    } catch (err) {
      res.status(500).json({ message: err.message });
    }
  });
  // Getting one Character
  router.get(&quot;/:id&quot;, getCharacter, (req, res) =&gt; {
    res.json(res.character);
  });
  
  // Creating new Character
  router.post(&quot;/&quot;, async (req, res) =&gt; {
    const character = new Disney({
      name: req.body.name,
      details: req.body.details,
    });
    try {
      const newCharacter = await character.save();
      res.status(201).json({ newCharacter });
    } catch (err) {
      res.status(400).json({ message: err.message });
    }
  });
  
  // Updating one character
  router.patch(&quot;/:id&quot;, getCharacter, async (req, res) =&gt; {
    if (req.body.name != null) {
      res.character.name = req.body.name;
    }
    if (req.body.details != null) {
      res.character.details = req.body.details;
    }
    try {
      const updateCharacter = await res.character.save();
      res.json(updateCharacter);
    } catch (err) {
      res.status(400).json({ message: err.message });
    }
  });
  
  // Deleting one character
  router.delete(&quot;/:id&quot;, getCharacter, async (req, res) =&gt; {
    try {
      await res.character.remove();
      res.json({ message: &quot;Deleted character&quot; });
    } catch (err) {
      res.status(500).json({ message: err.message });
    }
  });
  
  async function getCharacter(req, res, next) {
    let character;
    try {
      character = await character.findById(req.params.id);
      if (character == null) {
        return res.status(404).json({ message: &quot;Cannot find character&quot; });
      }
    } catch (err) {
      return res.status(500).json({ message: err.message });
    }
  
    res.character = character;
    next();
  }
  
  module.exports = router;
  
  
  </code></pre>
  <p>My parameters are the following:</p>
  <pre><code>const mongoose = require(&quot;mongoose&quot;);
  
  const disneyCharacter = new mongoose.Schema({
    name: {
      type: String,
      required: false,
    },
    details: {
      type: String,
      required: false,
    },
    subscribeDate: {
      type: Date,
      required: true,
      default: Date.now,
    },
  });
  
  module.exports = mongoose.model(&quot;Disney&quot;, disneyCharacter);
  
  </code></pre>
  <p>This is my API call:</p>
  <pre><code>
  Post http://localhost:3000/disneyCharacter
  Content-Type: application/json
  
  {
      &quot;name&quot;: &quot;Mickey Mouse&quot;,
      &quot;details&quot;: &quot;First Character from Disney&quot;
  }
  
  </code></pre>
  <p>Please let me know if you have any other questions or concerns.</p>