AtlasError:8000 and buffering timeout on my query

actually I am facing same issue. I am a noobie to web development. I am trying to learn and implement. I am using NextJs 13.4.12 and TypeScript. I’m getting the AtlasError:8000 and buffering timeout on my query. I tried await mongoose.connect(process.env.DB_URL||“mongodb://localhost:27017/projectname”,{
useNewUrlParser = true,
useUnifiedTopology = true,
})
but I am getting the error as well. How can I fix it. I am seeking guidance through out. TIA

Hey @Hrittik_Bhattacharjee,

Welcome to the MongoDB Community!

  • Could you please double-check that you have defined a database user with the proper roles and privileges in MongoDB Atlas?

  • Print/log the full MongoDB connection URI from process.env.DB_URL and verify it is using the correct hostname, username, password, database name, etc.

  • Make sure your IP address is whitelisted in the Network Access control panel in MongoDB Atlas. Test with Telnet that you can connect to the Atlas cluster on port 27017 from your current public IP.

  • Try connecting with the mongo shell first to isolate issues with the Node.js driver.

In case the issue persists please share a code snippet, including the require/import of the driver, the connection URI, and any error handling. Please obfuscate any sensitive credentials in the connection string, but leave the schema and hostname intact. This will help diagnose where things might be going wrong.

Regards,
Kushagra

1 Like