Hi There,
I am getting this error, do you know how I can fix it?
Dev error
MongooseServerSelectionError: connection timed out
at Function.Model.$wrapCallback (/root/api/node_modules/mongoose/lib/model.js:5433:32)
at /root/api/node_modules/mongoose/lib/query.js:4938:21
at /root/api/node_modules/mongoose/lib/helpers/promiseOrCallback.js:41:5
at new Promise (<anonymous>)
at promiseOrCallback (/root/api/node_modules/mongoose/lib/helpers/promiseOrCallback.js:40:10)
at model.Query.exec (/root/api/node_modules/mongoose/lib/query.js:4937:10)
at model.Query.Query.then (/root/api/node_modules/mongoose/lib/query.js:5020:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: TopologyDescription {
type: 'ReplicaSetNoPrimary',
servers: Map(3) {
'ac-vpfq8ag-shard-00-01.wdaa4iq.mongodb.net:27017' => [ServerDescription],
'ac-vpfq8ag-shard-00-02.wdaa4iq.mongodb.net:27017' => [ServerDescription],
'ac-vpfq8ag-shard-00-00.wdaa4iq.mongodb.net:27017' => [ServerDescription]
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: 'atlas-k9egcn-shard-0',
maxElectionId: new ObjectId("7fffffff00000000000002ec"),
maxSetVersion: 262,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: 30
},
code: undefined,
statusCode: 500,
status: 'error'
}