Replit, I just can't. MongoDB stopped working again (MongoServerSelectionError: ReplicaSetNoPrimary)

Problem description:
I’m receiving error when connecting to my MongoDB in replit. It started to happen a few minutes ago. I posted the same exact issue here: MongoDB suddenly stopped working (MongoServerSelectionError: ReplicaSetNoPrimary). The error on that previous thread got fixed after 24 hours.

Where’s the fix for this bug?? Should I wait 24 hours again and let time fix this again?? Is this inevitable? I can connect just fine with Visual Studio local client. This error seems ongoing for a month now. Even the guys from MongoDB said it’s been an ongoing issue since November 2022 and replit team can’t seem to make any changes about it. I’m wasting precious time.

Expected behavior:
It should connect just fine.

Actual behavior:
It shows these errors,

MongoServerSelectionError: getaddrinfo ENOTFOUND ac-8q8dm3y-shard-00-00.5ldtt3z.mongodb.net
at Timeout._onTimeout (/home/runner/Bojji/node_modules/mongodb/lib/sdam/topology.js:285:38)
at listOnTimeout (node:internal/timers:557:17) {
reason: TopologyDescription {
type: ‘ReplicaSetNoPrimary’,
servers: Map(3) {
‘primary’ => [ServerDescription],
‘secondary’ => [ServerDescription],
‘secondary’ => [ServerDescription]
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: ‘atlas-q5c7wq-shard-0’,
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined,
[Symbol(errorLabels)]: Set(0) {}
}

Steps to reproduce:
Establish connection to MongoDB
Run code.

Browser/OS/Device:
Windows 11

I just subscribed to Hackers Plan. There’s still an error. OMG

Hey there! This has already been noted by the replit team. Some users are having trouble connecting to MongoDB

The same thing keeps happening to me while paying for always awake. It doesn’t happen too often but every couple of days I see it happen again.

yeah, that’s what I mean.

Still down. This is really frustrating

The team have know about this for more than half a month. This is a complex issue and they have been working hard on a fix. @ReplitIronclad any updates?

Unfortunately I don’t have much context on this. Handing it over to @ShaneAtReplit

This has been an issue for a while, really frustrating (I have a lot of projects relying on MONGO)

No updates yet. I’ve been making sure we’re working on a fix

1 Like