Questions tagged [mongodb]

All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

When changing the Mongodb Ops Mgr to FQDN, All Agents on all servers in the deployments goes down

Our Mongodb Ops Manager servers had to changed from short hostname to FQDN due to SSL certificate updates. When we updated the SSL certificates on one of the Ops Manager servers, all the agents(...
0
votes
0answers
19 views

Avoiding data duplication in MongoDB

I need a strategy for avoiding duplicate data in MongoDB and I could need some advice. I'm facing following situation which I'll try to illustrate with an example: Assuming there are m libraries and ...
1
vote
1answer
16 views

how to retrieve mongodb admin password installed on AWS EC2

3rd party developers have installed MongoDB on AWS EC2 instance and later handed over code to me. Now I don't know what's the password for admin user of MongoDB but I do have ssh keys to connect to ...
1
vote
1answer
19 views

Does local.oplog.rs hold all data in mongodb replication?

I'm trying to do backup full and incremental backup, I wonder does local.oplog.rs collecitons contain all info that I need to do backup and incremental backup?
0
votes
1answer
14 views

How to use variables in a mongodump query

I want to backup data of last day (Current Day-1) every day using cron tasks. In the mongo shell, I can query the data using variables as below: var start = new Date(); start.setHours(0,0,0,0); ...
-1
votes
0answers
18 views

Permissions required for MongoDB service account

I am new to MongoDB Administration. Have SQL Server DBA background. I want to configure my MongoD service as a service that starts up automatically without having to issue the command mongod.exe every ...
0
votes
0answers
24 views

Linux Ubuntu: MongoDB 3 times faster after restarting. Why would that be? [closed]

the environment. db version v3.4.2 build environment: distmod: ubuntu1604 distarch: x86_64 target_arch: x86_64
1
vote
1answer
11 views

permission denied on mongod.lock, despite it being owned by mongodb

this is my mongod.lock: -rw-r--r-- 1 mongodb mongodb 0 Dec 3 17:09 mongod.lock hence this solution doesn't apply: https://dba.stackexchange.com/a/183018 this is how I start mongodb: sudo ...
-3
votes
1answer
44 views

From a backup strategy perspective, would it be efficient to use a relational DB (as MySql) and a document oriented DB (as MongoDB) in the same app?

I am developing an app where I need to store an undetermined number of properties for any given entity, for example: Entity || # of properties** Apples || 14 Oranges || 4 Pears |...
-1
votes
2answers
34 views

Document vs Relational Database for storing large amounts of low usage data [closed]

I have about 10,000 different datasets. These datasets vary in size and columns, they don't have a command structure. The datasets have between 500 to 10 million entries, each entry has about 20-40 ...
0
votes
1answer
20 views

Inserting records into Mongodb using Pymongo is using up my RAM incrementally and is eventually exhausting all memory

I am writing Python code that parses through a huge XML document of size 17GB(Wikipedia collection) and inserts each page title along with the links in that page (storing as a list) present on the ...
0
votes
0answers
22 views

Can I recover data from a WiredTiger .wt file?

I'm trying to recover data from a collection in MongoDB 4 using WiredTiger. I managed to recover the deleted .wt files from the disk, and by opening the files on a text editor I can see some of the ...
0
votes
1answer
28 views

Filter based on values after join operation - MongoDB

I have two collections in the following format - collection1: { "_id": "col1id1", "name": "col1doc1", "properties": [ "<_id1>", "<_id2>", "<_id3>"] } collection2: { ...
0
votes
1answer
24 views

Can I set different database directories in MongoDB?

In db2 we can create databases on different directories through db2 list db directory. Can we also do that on MongoDB? I am aware of the dbPath in the config file. But do all databases created have ...
0
votes
0answers
23 views

Hyper-V Live-Migrating MongoDB Server

Does anyone know if DBs in general or in this case a Centos 7.x box running mongoDB would have corruption or any issues for that matter, if Live migrated from one host to another ? These are hosted ...
0
votes
0answers
13 views

Can we replicate or restrict specific databases in MongoDB

In MySQL, we are having replicate-do-db/replicate-ignore-db during replication, where we can replicate or restrict specific databases from Master to Slave. In the similar way, is there any specific ...
0
votes
1answer
20 views

MongoDB Fragmentation affect the Performance in WiredTiger

Im using MongoDB 3.6 I have a huge number of fragmentation in my collections. 300+ GB on one collection. WiredTiger is the storage engine. I know its bad for the OS and much wasted space. This ...
0
votes
1answer
24 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 ...
-1
votes
1answer
20 views

Trouble designing mongodb 1-many collection/query that could grow without bounds

So in an application I'm currently working on, I'm having an issue designing a collection. I can't give away too much information about the application, but here is a similar (albeit not as realistic) ...
0
votes
1answer
15 views

MongodB cumulated conditionnal array:using map/reduce or aggregation

First, I aplogized because I have some problem to formalized my question so any idea on express it correctly will be appreciated and edited. Last try: How to get last of a cumulated conditionnal ...
-1
votes
0answers
30 views

Error sending response to client: SocketException: Broken pipe. Ending connection from 127.0.0.1

Getting error in mongod.log file. Please advise. 2019-11-04T23:42:07.847-0500 I COMMAND [conn60790] getmore mongo_dev1_cp2.cp_scan_list command: { getMore: 116085397519, collection: "cp_scan_list", ...
1
vote
1answer
28 views

MongoDB Shell support for map.set()

I am trying to use the MongoDB shell to run some scripts. Inside the JavaScript I am attempting to run var map = new Map() then map.set(1,1). However, I am getting the following error: E QUERY [...
0
votes
0answers
13 views

Storing images in MongoDb Atlas [migrated]

I'm trying to store images in my existing collection. For example, one of my document looks like {"_id":{"$oid":"5dc5a4851c9d440000cb2d5b"},"Name":"Johnny's Tavern","Monday":"11:30am-10pm","Tuesday":"...
0
votes
0answers
21 views

Mongodb doesn't respond

We have a sharded cluster with 3 shards. The version is: 3.6.13. The users of the prod. database (1,8 TB sized) complain about an issue. System works normally but after sometime it stucks and doesn't ...
0
votes
0answers
12 views

MongoDB connection initialisation delay on certain Windows 10 devices

System info OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.17134 N/A Build 17134 MongoDB Version MongoDB 4.2.1 x64 Windows. Overview When forming a ...
-1
votes
0answers
17 views

MongoDB Replica Set failover with 2 nodes

I have a Replica Set consisting of three nodes: -Server1 (Primary) -Server2 (Secondary) -Server3 (Secondary) When the primary server (still Server1) is down, a voting is started and Server2 get ...
1
vote
1answer
26 views

Mongodb automatic Replica Set creation with JS driver

The MongoDB docs state that one can use the mongo client console to initialize replica sets by running rs.initiate([config]). However, I don't want to have to manually use the command line for this. ...
2
votes
1answer
24 views

Mongodb: how to create multiple indexes on same field?

For example, I created this index: db.test.createIndex({field1:1}, {partialFilterExpression:{field2:{$gt:10}}}) Index created successfully. Then I want to create second index: db.test.createIndex({...
-2
votes
1answer
40 views

How sharding of databases effect ACID property or transactions?

MySQL (and other Relational Databases) are known to be ACID compliant with respect to transactions. However, when databases are sharded, does the ACID property of transactions break since now ...
0
votes
0answers
25 views

mongod log ms meaning

I cannot understand from reading the documentation what is the meaning of the ms in the mongod.log at the end of the following line: 2019-10-30T21:09:41.647Z I COMMAND [co48] command Db.noa ...
0
votes
1answer
38 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 ?
2
votes
1answer
17 views

MongoDB map-reduce impacts insert performance on source collection

I have a "hot" MongoDB(4.0.5) capped collection with a timestamp (and several other) indexes. Many applications (Java, NodeJS & C++) insert (never update) records into this collection at a rate ...
1
vote
0answers
10 views

What will be the behavior of mongodb under this partial network partition

Consider a shard cluster: Has only one shard, but the shard has 3 replicas A, B, C Has 3 mongos instances mongos and mongod instance are running across 3 different data centers. The primary node (A) ...
0
votes
1answer
28 views

Upgrading Mongodb from 3.2.6 to 4.2. Which is the better way to do it?

What is the best way to upgrade MongoDB? Say I have 3.2.6 and I want to upgrade to 4.2 Can I just use mongodump and mongorestore? Or are there any intricacies to it?
1
vote
0answers
40 views

How to connect mongodb from aws ec2 ubuntu docker containers?

I have tried mongosqld --addr localhost:3002 --mongo-uri xxxxx.com:27017 But it is throwing the following error: unable to load MongoDB information: failed to create admin session for ...
1
vote
0answers
13 views

Mongo Replica Set x509 Membership Setup

I have a MongoDB 4.2.1 replica set, that I am trying to setup x.509 membership as documented here https://docs.mongodb.com/manual/tutorial/configure-x509-member-authentication/ In doing so, I get ...
0
votes
1answer
26 views

How to get the last 10 query run on MongoDB?

I am using mongoose driver in my Node.js app and I want to know what queries mongoose run behind the scene when I call available function on mongoose model. e.g. I am saving a signup information for ...
1
vote
1answer
26 views

Migrating from MongoDB Atlas to self managed Mongo (EC2) server

There is an abundance of info about migrating TO Atlas but not too much I could find specifically about going the other direction. I am migrating a collection which is 250GB in size. I have tried ...
0
votes
1answer
16 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 ...
1
vote
0answers
34 views

How to handle databreach? [closed]

what is the immediate action to be taken from a Mongodb dba when we come to know our data is compromised or open to public without our knowledge. what are the actions to be taken immediately so that ...
0
votes
1answer
30 views

Why is MongoDB user with the only privilege as “find” able to insert and update collection?

I want my user to have only find action privilege on a specific collection. However, when I create the user with the privilege, restart the mongod server and run the mongo shell again with -u -p and --...
0
votes
1answer
21 views

Why is it necessary to run both mongod and mongo.exe in windows? What's happening behind the scene?

Why is it necessary to run both mongod and mongo.exe in windows? What's happening behind the scene? What's the difference between these two?
0
votes
1answer
42 views

Mongo: mongodump and the config database error

I've setup a backup script on my Ubuntu box using mongodump. However this currently doesn't work because of an error when attempting to dump the built in config database: (Apologies for the image, I ...
0
votes
1answer
21 views

how mongo db does locking for updates/inserts?

I have many data for each user that with write heavy and many for each separate users that there is not any relation between user's data; so there is two options for me to store them: 1. keep all user'...
1
vote
0answers
156 views

UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6;

Kindly assist me on following upgrade issue. My Arbiter upgrade (thru yum update -y ) has been failed with following error. 2019-10-19T07:19:25.944-0400 I CONTROL [initandlisten] 2019-10-19T07:19:...
0
votes
0answers
21 views

Mongo primary failover causes rollback

I have a replicaset that processes largish batches of inserts (a few million) every night. Last night, the primary failed over and went into a rollback state. All clients which access this replicaset ...
0
votes
0answers
12 views

what to pass as a key instead of username and password for anonymous users @login?

i am trying to make a mongodb schema in which i am allowing the person to publish projects anonymously, i already have the authenticated user schema and i am thinking of using that only to allow ...
0
votes
0answers
40 views

MongoDB - Setting up the MMS Automation Agent

I am currently trying to set up a testing environment that includes 3 MongoDB database deployments and one server with an installation of the MongoDB Ops Manager. I succesfully installed the MongoDB ...
1
vote
1answer
121 views

mongodump fails after exactly 10 minutes

Using single instance MongoDB v4.2.0 on Debian 9.11 with collection of 78GB and 60M documents on a 2 vCPUs, 13 GB memory server. This command is invoked on the same server where database runs: ...
0
votes
0answers
74 views

Error: Could not find host matching read preference { mode: “primary”, tags: [ {} ] } for set Cluster0-shard-0 :

I am trying to connect to the class Atlas cluster. In the cmd shell, running this command: mongo "mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:...