skip to Main Content

Mongodb – Intermittent Unhandled Promise Rejection – MongoServerSelectionError: connection timed out

I am getting below error randomly. Here is my stack App deployed on vercel is talking to Atlas mongodb (free tier) Nodejs - 18.16.1 nextjs 13 mongodb package version - 5.8.1 ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"MongoServerSelectionError: connection timed out","reason":{"errorType":"MongoServerSelectionError","errorMessage":"connection timed…

VIEW QUESTION

MongoDB not connecting while using host option?

I am unable to connect Atlas MongoDB while using --host option, But i'm able to connect while using --uri option where did i made a mistake? For example: --uri option It's working fine mongodump --uri="mongodb+srv://<username>:<password>@<hostname>/<dbname>" --gzip --out=/dir1/dir2 --host option getting…

VIEW QUESTION

ERRCONNREFUSED when connecting Mongodb in node.js

I am trying to set up MongoDB with Node.js and I keep getting the following error: Uncaught MongooseServerSelectionError MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 at MongooseError (c:Userslilpimongonode_modulesmongooseliberrormongooseError.js:7:1) at MongooseServerSelectionError (c:Userslilpimongonode_modulesmongooseliberrorserverSelection.js:26:1) at Connection.openUri (c:Userslilpimongonode_modulesmongooselibconnection.js:824:32) at <anonymous> (c:Userslilpimongonode_modulesmongooselibindex.js:381:10) at <anonymous> (c:Userslilpimongonode_modulesmongooselibhelperspromiseOrCallback.js:41:5) at promiseOrCallback (c:Userslilpimongonode_modulesmongooselibhelperspromiseOrCallback.js:40:10)…

VIEW QUESTION

Search MongoDB autocomplete filtered

I want to search autocomplete on the following fields :contactfirstname, contactlastname and name Also, want to filter based on userid(s) first then perform autocomplete search Issue: Without filter criteria, autocomplete is working fine With filter criteria in compound query not…

VIEW QUESTION
Back To Top
Search