Questions tagged [mongodb-4.2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
242 views

Mongodb replica stuck at STARTUP

I have 4 Servers: Mongo1(with secondary and arbiter), Mongo2(primary). Mongo3, Mongo4 Mongo1 and Mongo2 were initiated and successfully running for months. (1 and 2 + arbiter are connected over the ...
0 votes
1 answer
105 views

MongoDB OplogStart Missing

I understand that some times MongoDB secondary data becomes stale at which point, we need to perform an init sync from the Primary instance. But sometimes we see error logs that look like this: 2022-...
  • 103
0 votes
1 answer
353 views

MongoDB aggregation. Trying to use switch in map

Hi im trying to use a switch statement inside of map to increment a value depending on the case but im getting MongoServerError: $switch found an unknown argument: $$favcast is this viable? db....
0 votes
1 answer
217 views

Mongodb continuous schedule and cancel catchup takeover on replica set member

We have a mongodb 4.2 (stable branch) replica set with three members. It was working for several months without problems. Yesterday one of the secondary members started to do very strange things. I ...
  • 401
0 votes
1 answer
158 views

Queries on Mongo Secondary are not equally distributed

I have a MongoDB cluster setup with one primary and 2 Secondaries in a single shard setup. Every night we have a high load but one day and most of the read APIs have a SECONDARY_PREFERRED read ...
0 votes
2 answers
409 views

Is there an automatic way for a secondary member to promote to primary member in a replica set?

Here is my setup: Node 1 = 10.1.0.1 (Primary) - priority 1 Node 2 = 10.1.0.2 (Secondary) - priority 1 Node 3 = 10.1.0.3 (Secondary) - priority 0 In the event of Node 1 failure, Node 2 will be set to ...
  • 89
0 votes
1 answer
1k views

Rename all databases when doing a mongorestore?

I have a datadump but I need to change the name of every database while restoring them, if a database is named "customers" it needs to be "customer2", "products" to "...
  • 69
1 vote
0 answers
153 views

Mongodb Downgrade issue

I have upgraded mongodb to 4.4 from 4.2 in our dev server(RHEL 8). But unable to downgrade it from version 4.4 to 4.2 (Tried after changing package /etc/yum.repos.d/mongodb.repo). Getting error ...
0 votes
1 answer
1k views

MongoDB Aggregate Poor Index Usage

I've been trying to understand the MongoDB Aggregate process so I can better optimize my queries and I'm confused by usage and $match and $sort together. Sample DB has only one collection people [{ ...
0 votes
1 answer
60 views

MongoDB replica set and db.stats()

We just added a node to our replica set. After the node's state switched to SECONDARY, I do use obs db.stats() on both the PRIMARY node and the new SECONDARY. PRIMARY SECONDARY &...
  • 1
2 votes
2 answers
168 views

Failed to start mongo.service on ubuntu 16.04 after update from 4.0 to 4.2

I'm trying to update my MongoDB installation from 3.6 to the latest version [4.4] on Ubuntu16.04 using apt-get. Going from 4.0 to 4.2 I faced a problem during the startup process after updating the ...
0 votes
1 answer
687 views

Oplog incremental backup failure

I have scheduled oplog incremental dump using mongodump but it fails very often on majority of the servers. I have a shard cluster with around 200GB of oplog size defined and around 30-40 hours of ...
1 vote
1 answer
618 views

Consequences of increase Oplog to large size

I'm trying to add a new member (m*-server: 4.2.7) in my replica set (m*-servers: 4.2.1), and it can't sync in time, after the initial sync it changes state to RECOVERING and have: (~ 4.3 - 6.31 hrs) ...
4 votes
1 answer
11k views

MongoDB - Replication Oplog Window has gone below 1 hours

I'm working with MongoDB Atlas and I have a cluster of 3 with M30 and 100gb of storage. My current usecase is the following: - An user dispatches one search in my platform - The platform dispatches ...
  • 83
0 votes
1 answer
41 views

Mongo assigning user permsions issue on docker

I'm using docker image mongo and I extend it to create a user and assign permissions on image build with such a line COPY init.sh /docker-entrypoint-initdb.d/ Here is the init.sh: #!/bin/bash set -e;...
0 votes
1 answer
501 views

Mongo slow startup after upgrade to 4.2.5

I have upgraded the MongoDB replica set, which consists of 3 members, from 4.0.11 to 4.2.5. After upgrading, startup lasts about 5 minutes. Before upgrading it was instant. It is related to ...
0 votes
1 answer
355 views

mongorestore - documents fail validation

The similar question already have been asked: How to validate a mongorestore But how to actually validate the documents in mongodumb and mongorestore? And also - can I see the documents that fail ...
  • 101
0 votes
3 answers
9k views

Failed to start of service MongoDB community4.2 using Homebrew in Mac OS Mojave 10.14

Error message while starting the mongoDB service. Error: Permission denied @ rb_sysopen - /Users/syedahmed/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist I installed/reinstall the ...
0 votes
1 answer
623 views

MongoDB 4.2 using change streams with read concern majority disabled in a PSA deployment

I currently run a PSA (Primary, Secondary, Arbiter) deployment and thous only have two databearing nodes. In case of a databearing node going down, read concern majority prevented the change stream to ...