Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

464
Views
MongooseError: Operation users.insertOne() buffering timed out after 10000ms” in Mongo Db atlas

I am currently working with node and mongoDB here is my code

import dotenv from "dotenv";
import mongoose from "mongoose";

dotenv.config();

mongoose
  .connect(
    `mongodb+srv://OmniBotBuilder:${process.env.DBPASS}${process.env.DBUSER}.kx2vg.mongodb.net/${process.env.DBNAME}?retryWrites=true&w=majority`,
    {
      useUnifiedTopology: true,
      useNewUrlParser: true,
    }
  )
  .catch(() => console.error("Unable to connect to DB"));

mongoose.connection.on("connected", () => {});

const Schema = mongoose.Schema;

const omniGamesSchema = new Schema({
  discordId: Number,
  steamId: Number,
});

const omniGamesModel = mongoose.model("omniGamesSchema", omniGamesSchema);

const createNewUser = (discordId, steamId) => {
  const newUserMap = new omniGamesModel({
    discordId: discordId,
    steamId: steamId,
  });

  newUserMap.save((err) => {
    if (err) {
      console.error(err);
    }
  });
};

export { createNewUser };

and the error i am getting is this one enter image description here

MongooseError: Operation omnigamesschemas.insertOne() buffering timed out after 10000ms at Timeout. (C:\Users\dahiy\OneDrive\Desktop\bots\omni-games\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:198:23) at listOnTimeout (node:internal/timers:557:17) at processTimers (node:internal/timers:500:7)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This issue normally is caused because:

  • wrong auth, by the meaning the mongo path string is wrong so maybe double check your pass and username

  • check the allowed IP to access the database from the mongo website, if you want it to be accessed from everywhere just use IP: 0.0.0.0/0

  • Your internet connection might be slow to the point it cannot connect to the DB

Hope you found this helpful! :)

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!