Hi guy i get this error code can you help me?
Mongoose Error: operation users.insertone() buffering timed out after 10000m
this is my source codes = GitHub - widror31/carrental1
Hi guy i get this error code can you help me?
users.insertone() buffering timed out after 10000mthis is my source codes = GitHub - widror31/carrental1
Hey
@Ryan_Gosling,
Thank you for reaching out to the MongoDB Community forums ![]()
The shared error message indicates that the operation users.insertOne() is getting timed out after 10000ms, which means the connection to MongoDB is not being established correctly or is taking too long to process. You can refer to a similar thread here:
Hope it helps. In case you have any further questions or concerns, feel free to reach out.
Best regards,
Kushagra
In case you didnt find a fix. I had same issue. I could have identical code and sometimes the connection would just drop out. I solved this by making a new file the checks connections and if its dropped it reconnects.
execute: async () => {
let timeout = 25;
while (mongoose.connection.readyState === 0) {
if (timeout === 0) {
console.log('timeout');
throw new Error(
'timeout occured with mongoose connection',
);
}
await mongoose.connect(mongoToken, {
useNewUrlParser: true,
useUnifiedTopology: true,
});
timeout--;
}
console.log(
'Database connection status:',
mongoose.connection.readyState,
);
},
A post was split to a new topic: AtlasError:8000 and buffering timeout on my query