Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

463
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda