Questions tagged [mongodb-3.6]

The tag has no usage guidance.

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

Mongo E11000 duplicate key error collection after mongo 3.4 to 3.6 upgrade

I have a Mongo replica set on Ubuntu with three members configured for my information system and am having issues when I try to upgrade MongoDB from version 3.4 to 3.6 After setting the "...
1
vote
1answer
198 views

Import indexes from MongoDB v2.4 to MonDB v3.6.4

I have migrated the collection.bson file from MongoDB 2.4 to MongoDB 3.6.4 as collection.json. But their is 1 more file collection.metadata.json in MongoDB 2.4. How can I import this to MongoDB 3....
0
votes
1answer
132 views

Unable to perform queries through mongos

I have setup a minimal replicated configuration with mongodb 3.6.3,it seems to be everything fine but when I connect to the mongos (which as far as I understand acts like a kind of load balancer in ...
1
vote
1answer
332 views

Why findOne() hangs on a sharded collection?

A MongoDB v3.6.4 database with a large sharded collection and WiredTiger engine hangs when issuing a findOne() or find() command without any parameters. The collection has only the default index on ...
0
votes
1answer
801 views

Is it possible to retrieve a history of the remote connections to the MongoDB including the IP addresses and the executed commands?

For some reasons I disabled the user access control and somehow all collections have been wiped out. So I want an activity log to find out how this happened I need a list like this: | Date/Time ...
0
votes
1answer
199 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 [{ ...
1
vote
1answer
76 views

Shell Script to kill slow running Mongo Queries

I need to create a shell script that finds and kills long running mongo queries more than a specified threshold e.g. 15sec I plan to use db.currentOp(); and db.killOp(); to find and kill queries but I ...
0
votes
2answers
3k views

MongoDB CSV Export: One Array/Column & Array Index on rows, or vice versa

I have a MongoDB schema that looks like this: const batchSchema = mongoose.Schema({ _id: mongoose.Schema.Types.ObjectId, time: {type: [Number]}, tmp: {type: [Number]}, hum: {type: [Number]}, ...
2
votes
1answer
870 views

How to properly use moveChunk when chunks of certain range needs to be moved?

A MongoDB 3.6.3 database has two shards and a mongodump file with partial data of one collection needs to be restored. The first shard is named "fast" while second "slow". The idea is to restore the ...
0
votes
1answer
250 views

unable to add a range to a tag using sh.addTagRange command

Have setup a 4 node test shard cluster: 1- mongos 1- config server 2- shard nodes hosting 1 shard each for a collection. Cluster is working perfectly, but when trying to run the following command: ...
0
votes
1answer
245 views

Slow performance of query with $and & $or operators

My query with $and, $or operators is performing poorly. Even though I've built a compound index on all three fields that are specified in my query criteria, the query does a complete collection scan. ...
0
votes
2answers
2k views

How to speed up MongoDB chunk moving between shards

On a MongoDB 3.6 in a replica set and WiredTiger engine we have a large collection with 7.7TB of data. We started to see severe performance issues (extreme CPU usage and slowdown of data replication) ...
0
votes
1answer
436 views

How to use mongoexport command with ssl?

I am trying to export collection data from (SSL MongoDB 4.x), for this I am running below command on linux terminal. Earlier I used mongoexport command in Linux terminal without SSL which works ...
3
votes
1answer
3k views

MongoDB crashes with out-of-memory or is being killed by oom-killer

A two shards MongoDB database regularly crashes with out-of-memory error or is being killed by the oom-killer. The system runs on GCE Debian 9.4 with MongoDB v3.6.5, WiredTiger storage engine and ...
0
votes
1answer
261 views

MongoDB Ops Manager

I have few questions regarding backup process in MongoDB Ops Manager 1) How backup process works ? 2) According to documentation for production do we need to have 3 dedicated servers for ...
0
votes
1answer
3k views

MongoDB 3.6 crashed due to invariant() failure

MongoDB crashed twice in 6 hours today due to invariant() failure. We have been using MongoDB 3.6.3 for more than a year now, but this is the first time that we saw this issue. The extract from the ...
1
vote
1answer
729 views

MongoDB 3.6 create local Shard db without replica

This is what I want to do: Create a Config Server Create 2 Shard Create a Mongos Router I don't want to replicate my data using replica set, I want to simulate that each shard has only a part of ...
3
votes
0answers
781 views

MongoDump Failed: error writing data for collection `collection` to disk: error reading collection: EOF

[BACKUP COMMAND] mongodump --host 127.0.0.1 -d database --port 27017 --username username --password password --out /output/path/mongodump_DATE_12_00_AM [ISSUE] Failed: error writing data for ...
1
vote
1answer
406 views

It is possible to take incremental backup in mongoDB Shard cluster? without opsmanager

Shard MongoDB Cluster: 3-router 3-config 2-shard (3-replica's per shard) We are tring to take incremental backup for every one hour. We gone through few google links, but no luck. As per our above ...
0
votes
1answer
60 views

How to warm a MongoDB index

We're running a huge MongoDB with a large index (made of of four fields) which was created ad-hoc and should now be superseded by slimmer one (of the first two fields). But the problem is we can't ...
0
votes
0answers
34 views

Why mongodb's storage size is larger on secondary than on primary?

I don't understand why the storage size is significantly larger on the secondary than on the primary (450 GB vs 375 GB). hardware, operating system, file system and mongodb configurations are ...
1
vote
0answers
128 views

How to simulate slow queries on MongoDB

I need to write a shell script that finds and kills long running mongodb queries, but I don't have access to the database that runs slow queries, how to I simulate running slow queries on my local ...
0
votes
0answers
11 views

Append object to document node.js/mongodb

Say I have a mongodb document I'm trying to update. The schema is level1 (object)> level2 (object) > "objects". If I want to add another object to the end, what is the method to do ...
0
votes
0answers
24 views

Appropriate language to write a Script that Kills Long running query MongoDB

I want to create a script that kills queries when they reach specific time threshold, I will be using db.currentOp() method to get information about currently running queries, and use db.killOp to ...
0
votes
0answers
90 views

MongoDB 3.6.21 crash and not reIndex

I try to reIndex() my collection but not working and It removed all indexes. I checked mongod.log and see: 2021-01-18T05:56:59.492-0600 E STORAGE [conn1] WiredTiger error (5) [1610971019:492802][...
0
votes
0answers
41 views

MongoDB numerous slow query logs with zero keysExamined

using a MongoDB version 3.6 Replica Set, I am wondering why a query that resulted in no key examination and document examination would result in being slow. For example, I have numerous slow query ...
2
votes
2answers
143 views

Should I put users in admin DB or in the DB that they should have access to [closed]

What would the pros / cons be of putting users that should have access to one database in the admin database instead of the database that they should have access to? Background: I'm a C# developer. ...
1
vote
1answer
252 views

No output when use pymongo watch()

I try to access real-time data changes with pymongo.mongo_client.MongoClient.watch(), code example (Python 3.5.3, pymongo==3.7.2): from pymongo import MongoClient DB_CON_STR = "mongodb://10.10.10....
0
votes
1answer
1k views

how to run db.adminCommand() using pymongo for mongodb 3.6

I want to run this command and get it's output using pymongo module. db.adminCommand({getParameter: 1, logLevel: 1}) or say I want to run this command db.adminCommand( { setParameter: 1, ...
5
votes
1answer
15k views

node is not in primary or recovering state

My config file is: systemLog: destination: file logAppend: true path: c:\data\log\mongod.log storage: dbPath: c:\data\db journal: enabled: true replication: replSetName:...
1
vote
2answers
1k views

How to find all invalid document based on jsonSchema validator?

One of the new feature in MongoDB 3.6 is jsonSchema validator. I can create a collection with an validator like: { "validator": { "$jsonSchema": { "properties"...
0
votes
0answers
22 views

MongoDB 3.6 fresh install

I'm using mongodb 3.6.18 I'm running a cluster of 2 shards and 1 config replicaset. I get this error when trying to set the compatibility version to 3.6: global:PRIMARY> db.adminCommand( { ...
0
votes
1answer
1k views

MongoDB, Getting Started and Connecting with Compass

I'm trying to connect to my mongoDB running as a service on my rPi3B+, using openSuse Tumbleweed 64bit, mongo version 3.6.2, from my laptop sharing the same LAN/Wifi (pi on LAN & laptop on Wifi). ...
0
votes
1answer
1k views

Cannot restart or repair mongodb database after the crash (***aborting after invariant() failure) [closed]

After an unexpected crash, I can't restart or --repair the mongodb database anymore. While restarting the server with systemctl restart mongodb I am getting the following: 2020-09-16T20:25:23.835+...
1
vote
3answers
4k views

Failed to import a mongodb database with duplicate fields

I'm trying to import a mongodb database and I've been using the mongorestore command, the import starts without problems until it gives the error: Failed: dbprod.mys_account: error creating collection ...
1
vote
1answer
3k views

Binding specific ips with Mongodb

I am using Mongodb 3.6.3 on Centos 7. I am running the below command: sudo mongod --storageEngine wiredTiger --dbpath /data --bind_ip_all --logpath /var/log/mongodb/mongod.log --fork and everything ...
0
votes
2answers
555 views

I am trying to achieve a Disaster recovery for Mongo DB

Right now i have a MongoDb HA in site one and i need another site with asynchronous replication enables in another location.This is a base plan of mine to achieve a disaster recovery . I dont have ...
0
votes
2answers
1k views

MongoDB Replica Set InitialSyncOplogSourceMissing error

I am setting up a 3 nodes MongoDB replica set with one node in AWS using Mongo 3.6.12. There are about 400GB data need to sync to secondary nodes. Initial sync starts fine. However, after data sync ...
-1
votes
1answer
133 views

Migrate data from an older version of mongodb

How can I backup and restore a large mongodb database (500GB) from a server running an older version (v2.6) than the target one (v3.6)?. The downtime is critical. We've tried by making a straight copy ...
1
vote
2answers
710 views

Unable to start mongodb as a service using sytemd

I have the following mongod.service file: [Unit] Description=High-performance, schema-free document-oriented database After=network.target Documentation=https://docs.mongodb.org/manual [Service] ...
4
votes
1answer
18k views

How do we reference to a collection in MongoDB?

This is my first my first post in this forum. I am from RDBMS background and wanted to learn MongoDB which will help me in migrating our applications to MongoDB. I am creating two collections (...
-1
votes
1answer
415 views

Restoring from MongoDB Atlas (4.2.5) to DocumentDB (3.6) do no succeed due to error "Unsupported BSON : type Decimal128"

MongoDB Atlas (4.2.5) to DocumentDB (3.6) Below is the command I used for mongodump on my MongoDB shell. I had received a warning, but it was successfully completed. C:\MongoDB\bin>mongodump --...
0
votes
0answers
38 views

Migrate MongoDB 2.4.14 to MongoDB 3.6 [duplicate]

I have a database with MongoDB 2.4.14 and I want to migrate the database to MongoDB 3.6. Note: the file is original from the db path. Not from mongodump. This process is messy as it requires doing ...
0
votes
1answer
43 views

Chunk size bigger than configured

We have a sharded mongo cluster. We have configured the chunk size to be 256M but they are ~1.5G each. There are no jumbo chunks as our shard key is well balanced (we have also checked for them ...
0
votes
2answers
875 views

MongoDB hidden node still receiving connections [closed]

I'm not sure if this question been asked before or if the following behavior of MongoDB is normal. Searching online output no results to this scenario. Initially, we had a 3 node deployment, 1 ...
0
votes
1answer
217 views

Can't migrate standalone MongoDB to Cluster

I'm trying to convert a standalone MongoDB database into a cluster in order to migrate my database to MongoDB Atlas. I've followed the following steps to try and convert it: Stop my mongodb instance ...
2
votes
2answers
4k views

MongoDB does not allow to create unique partial index in field that contains null

I'm using MongoDB 3.6.9 (with Ubuntu) to save a set of documents that contain one field named rss_id and for some documents, this field has the value null. I want to create a unique index in that ...
0
votes
1answer
252 views

We use MongoDB 3.6 community version, How can i get the number of hits on single collection as well as bandwith usage?

Is it possible to get the number of hits on single collection as well as bandwith usage in mongodb ?
0
votes
1answer
4k views

mongodb - what roles the user to grant access to all databases

I have created mongouser as testuser with below roles. I want to give access for new databases for this user. what roles the user to grant access to all databases. db.createUser({ user: "testuser" , ...
1
vote
0answers
258 views

Why did mongoDB reads from disk into cache suddenly increase?

This is a mongoDB replica set with 1 primary, 1 secondary and 1 arbiter. Suddenly the reads from disk into cache and cache page evictions increased 2x-3x and stay elevated since then (all metrics ...