Questions tagged [mongodb]

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

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

MongoDB - Database vs Collection memory-wise

Lets say for example i need to have 5 collections, each collection is about 10GB. What is the difference in performance, with emphasis on memory usage, between assigning each said collection to a ...
0
votes
2answers
813 views

Audit Trail in NoSQL vs. Relational DB, audit trail feature in MongoDB [closed]

Two questions regarding selection a DB type and engine for the scenario when the Audit Trail functionality is a must: Is there any preference in DB type (NoSQL/Relational) choice when the Audit Trail ...
2
votes
0answers
243 views

Mongo Db Update (upsert) taking several seconds

Machine Specs: 12 Cores 64GB Ram Mongo Setup: Mongo Version 4.0.5, XFS file system (Flash SAN backed), 1 replica set with 2 replicas, 10GB network all local (sub 1ms latency) Operation Being ...
0
votes
1answer
122 views

Integrating MongoDB metrices with Cloud watch

We are hosting mongodb in AWS environment and planning to create incident in Servicenow using AWS Cloud watch alarm facility Has anyone integrated MongoDB Monitoring metrices with Cloud watch to ...
0
votes
1answer
88 views

MongoDB 3.6, adding replica set always fails as on production setup with cannot open /dev/urandom Too many open files

I am trying on add a 3.6 mongoDB node to a 3 member replica set running 3.4. Doing this as a part of DB upgrade from 3.4 to 3.6. When I add the new member to replica set, it goes to STARTUP2, data ...
0
votes
1answer
135 views

Why am I seeing these mongodb 3.6.5 server log messages in huge amounts?

Could someone please shed some light on these mongodb 3.6.5 server log messages on the primary node of a 3-member replicaset? rs.status() says all the nodes are up and running but seeing a ton of (I)...
0
votes
0answers
38 views

[MongoDB]See Collections (and Files) created in a Shard on the Cluster

My structure: A Sharded Cluster with multiple Shards. Each Shard contains 1 Collection, which is pinned to it by tags. Every Shard is at the same time a ReplicaSet Secondary. It receives data from a ...
1
vote
1answer
67 views

Is mongoreplay included in the toolset with mongodb 4.0 community version for windows?

Where to find mongoreplay tool in mongodb 4.0 community version for windows? It is not in the same place as other tools - mongoexport, mongoimport, etc.
0
votes
0answers
22 views

Mongo Collection Mysteriously unavailable

We are running a mongo on single EC2 instance, we were not able to connect to it , upon debugging we saw CPU usage was spiking , this was the problem we faced previously we then restarted the instance ...
2
votes
0answers
62 views

MONGOS uselessly scanning indexed documents when counting on shards

I have a simple collection with 40M documents distributed over 2 shards. The documents contain a field named COUNTRY with a sparse index on it. db.contacts.count({ "COUNTRY": "US" }) I am trying to ...
0
votes
1answer
62 views

MongoDB Indexing - What happens if I don't index all necessary fields?

Let's say I have a collection with 20 fields and a query that uses 5 of them, to find the documents I need. 3/5 of those fields are always used in the query, 1 for equality comparison, 1 for range ...
1
vote
1answer
69 views

MongoDB Indexing - How many fields should I index?

I have a Collection in my db, called Post. Here's how it looks: Post { user: <EmbeddedObject>, school: <EmbeddedObject>, hashtag: <EmbeddedObject>, numberOfReports: ...
0
votes
1answer
39 views

What is the best way to cross check the record in multiple collections

I am developing the application in which system will show the campaign content to users which he/s never seen. To keep the logs either the specific user seen the specific content or not, i am ...
2
votes
1answer
130 views

How does the MongoDB query optimizer evaluate candidate plans?

The MongoDB query optimizer processes queries and chooses the most efficient query plan for a query given the available indexes This is an excerpt from MongoDB documentation. I am looking for more ...
1
vote
1answer
224 views

Connection string for connecting mongo database with SSL enabled

Am facing some below problem in my mongodb replication environment I have 3 replica set environment with SSL enabled and ssl mode as preferSSL 3 servers has 3 different Key file with common CA file ...
1
vote
0answers
29 views

mongo-hadoop connector makes duplicate data by numbers of Mongo Sharding

I'm using mongo-hadoop connector which makes that Hadoop can get data from MongoDB and save into MongoDB. I found MongoDB data is duplicated after Hadoop Map-Reduce job with MongoDB data. environment:...
0
votes
1answer
674 views

Mongo: Not authorized to do anything after enabling service on boot

I have been using MLab and MongoAtlas successfully for a project I'm working on. Now I'm trying to migrate the DB to local storage so that the software can write and store data without needing ...
2
votes
1answer
840 views

Why mongo is choosing the wrong index / execution plan?

In production mongod logfile, we can see a lot of slow queries. Most of them are not using the best index and consequently the best execution plan is not used. However, when I run the same queries by ...
0
votes
1answer
51 views

mongodb: Can I create an unshard Replica set for a sharded cluster?

I have a 3 node shard cluster mongoDB with replica set, and want to add (single node replica set) a un-sharded Replica set to collect all data in one node. Can I create an unshard Replica set for a ...
0
votes
1answer
78 views

Find and Insert Missing data in Mongodb Collection

I want to write python3 code to check and insert missing data. My MongoDB collection documents have one field named "height" which is BTC block number. I want to traverse in a range start to the ...
0
votes
0answers
38 views

Mongo OPS manager and mongod running under root account

I am trying to administrate and monitor databases by using Mongo ops manager. OS Version : Oracle linux 7 Mongod version : 4.0.5 enterprise Ops manager : 4.0.5 enterprise I have installed the ...
1
vote
1answer
846 views

MongoDB replica has no primary

I have an existing MongoDB setup (part of a Graylog installation) where I'm attempting to configure a replica set with a primary, secondary and arbiter. I had the primary and arbiter configured ...
0
votes
1answer
173 views

Invalid access at address: 0 for Mongo v4.0.5

I am running mongo on kubernettes in statefulsets. It was working fine for weeks then all of a sudden this morning i started getting errors where mongodb was failing. I tried running: mongod --...
0
votes
0answers
62 views

Mongo Atlas API - Get Databases and Collections in a Cluster

So with Mongo Atlas I can easily list clusters in a project by calling the API as follows: curl -i -u "<user@domain.com>:<my-api-key>" --digest "https://cloud.mongodb.com/api/atlas/v1.0/...
1
vote
0answers
77 views

Mongodb find document with too large key

I'm trying to create an index and I'm getting this error: 2018-12-30T15:28:30.853-0800 I COMMAND [conn580067] command db.$cmd command: createIndexes { createIndexes: "node", indexes: [ { ...
0
votes
1answer
91 views

Mongodb what is the cost of array queries?

As far as I can tell, find queries in mongodb involving an array appear very expensive. Take as example the queries given in: https://docs.mongodb.com/manual/tutorial/query-array-of-documents/ db....
0
votes
4answers
140 views

How to tell if a project needs a NoSQL database solution? [closed]

How to tell if a project needs a NoSQL database solution? I think that SQL limits define it. If the project needs bigger database or bigger fields then it needs NoSQL. Am I right? I looked into ...
0
votes
0answers
400 views

How to Recover Mongodb database

I have transferred my mongodb database to a new computer and am having trouble opening the database. I don't get any errors, it just won't show the 'finance' database. Here is the response when I say ...
0
votes
1answer
50 views

mongodb array query woes

I am struggling with array matching and getting multiple records back. "players" : [ { "pname" : "player_4", "loc" : [ -2.2, 1, 0] }, { "pname" : "player_2", ...
0
votes
2answers
171 views

mongodump download collections only if changed

If I get it right if to make mongodump in to directory that already contains previous dumped data it will still download full collection data even if is not different from data containing in the dir ...
1
vote
2answers
70 views

Is it possible to run an arbiter on a machine that also hosts a secondary member?

I have two machines (it is a restriction) configured as a replica set with MongoDB 3.6.5. Is it possible to run an arbiter on a machine that also hosts a secondary member? Even if it is not ...
0
votes
1answer
51 views

Replica Set Oplog Maxsize

I have two databases (Mongodb 3.6.5) using ReplicaSet, when I made a split in the network, I am forcing the secondary database to be the primary. cfg = rs.conf() cfg.members[0].votes = 0 cfg.members[...
0
votes
1answer
79 views

How to solve replication in MongoDB only with two machines?

I have two machines connected in a ring network, each one running Wildfly in HA mode using JGroups ant MongoDB in HA Mode using Replica Set. The machine 1 is the primary and machine 2 is secondary. ...
0
votes
0answers
21 views

Delete latest data from mongodb collection

I am using MongoDB 4.0. By mistakenly, I insert 100 BTC blocks transaction data in the wrong collection. Now I want to remove only that data which is inserted recently. I am not getting that how much ...
1
vote
0answers
272 views

Interesting Database Designs for Product Catalogue including a Recursive Approach

I am doing some work for a client and they are creating a database of products of which I need to consume product data when it's created and updated to store in a third party service and then present ...
0
votes
1answer
806 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" , ...
0
votes
2answers
155 views

How verify if replicaset is working?

I am newbie with MongoDB and even more in administration of databases. But my boss passed me an issue to solve. SCENARIO I have two servers using MongoDB and ReplicaSet, when I run the command db....
1
vote
0answers
63 views

Mongodb default setup on Azure - default connect string from local shell

I have a new Azure VM (Ubuntu 18.04.1 LTS) which has docker. dragam@USDockerVM:~$ IRE> docker --version Docker version 18.09.0, build 4d60db4 Issued the command docker pull mongo this ran ...
0
votes
1answer
143 views

mongodb replica set No Election of Primary with 6 of 7 Nodes UP

I have 8 instances running on Scaleway , 5 for Data and 3 Arbiter. And the versions of mongo on them are such : mongodb2 (mongodb 3.4.9) mongodb4 (mongodb 3.4.15) mongodb5 (mongodb 3.4.15) ...
0
votes
1answer
39 views

Backup of MongoDB collection data and rename the collections [duplicate]

I want to take a collections data backup on a different host, with renaming the Collections. I am very new to MongoDB. Please help me with this task.
1
vote
1answer
62 views

mongorestore to --oplogReplay or not to --oplogReplay?

The MongoDB documentation on --oplogReplay is a bit vague. It just keeps saying a "point in time" snapshot. How is this different from dropping the sink database and restoring from the source? What ...
0
votes
1answer
45 views

E: Version '2.0.25' for 'mongodb-10gen' was not found while installing this specific version

I'm trying to install version 2.0.25 for some testing work. I followed this documentation. Here are the steps: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo 'deb ...
0
votes
0answers
348 views

Forgot mongodb admin password

Forgot Mongo DB admin password, how can we get/reset it? Can we create new user with admin rights? Can we set admin by disabling any settings in config file?
1
vote
1answer
612 views

MongoDB merge two collections and drop documents with same value in field

In my database I have two collections, but some documents were added (possibly) at different times to both collections. I could use mongodump and then mongorestore for merging. But then I have the ...
1
vote
1answer
60 views

Mongodb as a data ware house?

Will mongodb a good choice as a data warehouse considering following situation? We are building analytics, report generation platform for our client and a typical table growth in terms of rows will ...
0
votes
0answers
27 views

Should images be embedded in a MongoDB document when there is a one to many relationship?

Please see the DDL below from my CQRS write database: CREATE TABLE Offer (ID uniqueidentifier NOT NULL, Description varchar(50), Image varbinary(max), primary key (ID)) CREATE TABLE Person (ID ...
1
vote
1answer
625 views

Mongo queries are slow and yielding/waiting for locks thousand times

We are using mongo setup with replica sets on AWS. Setup Details: 1 Primary node: r3.8xlarge 4 secondary nodes: r5.xlarge Mongo version: 3.0.8 (WiredTiger) Database size: 358GB We have configured ...
3
votes
1answer
130 views

Mongo WriteConflictException in log file

I am experiencing ALOT of this WriteConflictException in my mongo log file, this does not seem to affect the application, because I am not seeing any special errors and everything seems to work fine. ...
1
vote
1answer
79 views

Best practices for Feed restructuring in a social app database

I have a social app, where users can post to the school they chose on registration. Each post can have a hashtag and a school (all pointers, (hashtag is optional, school is not)). Users see posts ...
2
votes
0answers
35 views

MongoDB - Best practices for Feed restructuring in a social app database [duplicate]

I have a social app, where users can post to the school they chose on registration. Each post can have a hashtag and a school (all pointers, (hashtag is optional, school is not)). Users see posts ...