Mongoose Error: operation `users.insertone()` buffering timed out after 10000m

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

Hey :wave: @Ryan_Gosling,

Thank you for reaching out to the MongoDB Community forums :sparkles:

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,

1 Like

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) {
				throw new Error(
					'timeout occured with mongoose connection',
			await mongoose.connect(mongoToken, {
				useNewUrlParser: true,
				useUnifiedTopology: true,
			'Database connection status:',

A post was split to a new topic: AtlasError:8000 and buffering timeout on my query