Questions tagged [mongodb]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
88 views

32GB RAM needed to work with 200.000.000 rows in MongoDB?

I've been playing with a large dataset, consisting of a few tens of billions of rows of small ascii strings. I want to count the number of occurrences of each string in the dataset, and i suspect the ...
0
votes
1answer
50 views

Mongodb find() not working as expected, PHP [closed]

Mongodb find() seems Not to work, I have tried all I could and nothing works so far. using PHP7+ I have a Document in the strure like the image below In SQL I could do something like:SELECT....... ...
0
votes
1answer
32 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
1answer
28 views

documents don't go into newly added shard

I have added a shard to an existing cluster, and when I do db.printShardingStatus() I see a distribution: mongos> db.printShardingStatus() --- Sharding Status --- sharding version: { "_id" :...
1
vote
0answers
41 views

adding documents to shard collection results in incorrect amount

I have added 2 shards to my cluster: sh.addShard("127.0.0.1:27023") { "shardAdded" : "shard0000", "ok" : 1, "operationTime" : Timestamp(1552115819, 4), "$clusterTime" : { "...
-1
votes
1answer
39 views

Automate setting secondary node to primary when majority nodes are down-MongoDB

There are many ways to force a secondary node to become a primary when majority nodes are down in mongo replica set. But we need to do this manually. For eg, forcing reconfig: cfg = rs.conf(); cfg....
1
vote
1answer
61 views

mongodb sharding collection

Im trying to shard my collection. when I execute the command: sh.enableSharding("testdb") I get: { "ok" : 1, "operationTime" : Timestamp(1552083125, 2), "$clusterTime" : { "...
1
vote
1answer
58 views

changing domain name for Mongodb primary

Im trying to initialize my replica set sp that the primary node has a specific domain:port pairing. what I want is: "vagrant-ubuntu-trusty-64:27022" but what I get is: "localhost:27022" This ...
1
vote
1answer
121 views

Why mongodb logs commands in the log file and how to avoid that?

OS: Windows 10/ Server 2012 Mongodb verison : 3.4.9 I have set the mongod --logPath and --quiet command line parameter The logs are just growing beyond 100mb and not rotating. Seeing the logs I see ...
0
votes
1answer
33 views

advice on modeling schema to have better access to foreign entity

I am fairly new to modeling on MongoDB--please consider this simple example schema const userSchema = Schema({ name: String, username: String }); const addressSchema = Schema({ user: { type: ...
2
votes
1answer
148 views

MongoDB stepDown fails in a PSA Architecture

I have set up a MongoDB cluster using a 3-Member Primary-Secondary-Arbiter Architecture Environment: LXC containers Linux Debian Stretch (9.8) MongoDB server version: 4.0.6 MongoDB Containers: lxc-...
0
votes
1answer
97 views

3 Node mongo db authentication setup fails

I have 3 node mongodb replica set as below Primary node Secondary node Arbiter node Replication set is enabled for all three. I am trying to set up authentication for these nodes and i followed the ...
0
votes
1answer
47 views

MongoDB Replication Set Configuration Issue on CentOS 7

My mongodb instance will not run as standalone and I haven't been able to discover why. Its probably something simple. Please point me in the right direction. Linux myserver 3.10.0-514.el7.x86_64 #...
0
votes
1answer
39 views

deploy replicas on multiple VMs

How do you set up a multi-node replica set in Mongodb? I don't know where to start. I'm trying to set up a replica set of three members in three virtual machines, i.e. there will be a total of three ...
1
vote
1answer
60 views

Is there a way to store int in ObjectID? [closed]

I'm trying to migrate MySQL user ids to MongoDB. user ids are incremental values like 1,2,3,4... Is there a way to store int in ObjectID?
1
vote
1answer
40 views

Sharding the Existing MongoDB

I've got 3 dedicated non-virtual servers (srv1-3). On one of them (srv1) i've got MongoDB in production, that already have got really big amount of data. At the present time there is no sharding or ...
0
votes
0answers
40 views

Transaction on defriend and multi databases

I have a big issue when i'm working with multi database and diffrent databases as same time. The problem is that I'm working with mssql, mysql and mongodb at sametime, and what I need is a way to be ...
0
votes
1answer
37 views

Can't change MongoDB default DB path

I know there are multiple questions on the same issue and I followed them but not sure what is happening here. First of all I am trying to change the default db path to a a separate mounted disk. And ...
1
vote
1answer
175 views

mongodb “WriteConcernFailed” on a replica set

I have a replica set of 4 members. 1 primary, 1 arbiter, 1 secondary, and another one that should be secondary, but have issues and is not connected. (in a "connecting..." state). When the ...
0
votes
0answers
25 views

MongoDB Script Fails in the cluster

I am trying to do a database operation for a MongoDB database hosted in Compose.io. My mongodb script is db.getCollection('companies').find({}).forEach(function(company){ var oldHosts = company....
0
votes
0answers
26 views

Mongodb - add new node secondary in existing replica set shard

my mongodb configuration which i am trying to add. systemLog: destination: file logAppend: true path: /var/log/mongodb/mongod.log storage: dbPath: /var/lib/mongo/mongo journal: enabled: ...
0
votes
1answer
39 views

What is mongodb logging as a COMMAND?

Relating to mongodb's documentation, database commands such as count will be logged as component COMMAND. However neither db.count() nor db.runCommand({count:'mycollection'}) produces a COMMAND log ...
0
votes
1answer
133 views

How to efficiently design Firebase database for Home service Booking application? [closed]

I'm planning to build my own app. It's a home service App to link users with other providers. I'm recently used a NoSQL database, Firebase, and I am stuck with the design of the database for my app. ...
0
votes
1answer
304 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
284 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
2answers
49 views

MongoDB - changing data directory name changes data

I am witnessing a very bizzare behaviour of MongoDB. I launch MongoD on a test system (Windows 10, 64bit) like this: "C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --dbpath "C:\MongoData" I ...
1
vote
1answer
39 views

MongoDB sharding and zone tag that has a range of 1 key value

Suppose I have a zone tag that has a range of exactly 1 key value, such as the letter A. Further, suppose I assign this zone to two shards. Will the data with a shard key of A be put on both shards? ...
1
vote
0answers
87 views

Mongodb secondary reads data at 100% 24/7

We have a Mongodb 4.0 database, running a replica set with 3 members. Total database size is about 800GB. All of the members are running in docker containers. Docker shows that the master container ...
1
vote
0answers
31 views

MongoDB ticket availability reaching zero

I recently came across intresting issue. I have a sharded cluster which has two replication sets with 2 secondaries. On my primaries, there were 300-400 connections at a point in time, shortly after ...
1
vote
0answers
20 views

Joining on nearest timestamp in MongoDB

MongoDB version: 3.2.11 Coming from using primarily PostgreSQL, I am new to MongoDB and am having trouble constructing complex queries in the required JSON format (where in SQL I would use CTEs). To ...
1
vote
0answers
36 views

Noob Questions - Database approach

I have a database of "records" that relate to photos - title, location, text, tags, etc. I am now adding more fields for other media types, videos for example will get an transcript, audio will get ...
0
votes
0answers
78 views

MongoDB count() query returns outdated result in mongo shell / python script

Documents in my MongoDB collection are changing status field very frequently. I can observe it using a mongoDB client (Robo 3T). Now I'd like to monitor this process using mongo shell (or python ...
0
votes
0answers
138 views

Mongoexport and mongodump disk usage rationale

I just had an interesting experience with the mongoexport tool and came out with a doubt about the exporting process' disk usage. I was trying to dump a 50 MB collection to a disk that had 3 GB free ...
0
votes
0answers
27 views

Fetch only those record which do not have matching amounts

I have a mongo collection as shown below { "_id" : ObjectId("5c5c86633b897535539c1b36"), "studentId" : "dsdlkjafhiuelfdldahfiu", "marks" : [ "subject" : "Physics", "...
0
votes
1answer
115 views

Mongoexport halts when it reaches 101 records

I'm trying to dump a MongoDB collection from a remote server to a local JSON file. First, I do some ssh port forwarding to begin with: ssh -NL 12345:localhost:27017 $REMOTE_USERNAME@$REMOTE_HOST &...
0
votes
1answer
42 views

Mongo Ops Manager Cant Find process for member

When starting mongo ops manager and checking mongodb process it shows 0 mongods, and in system warnings throws the warning "Unable to find process for member XXX:27020 in rs_1" I can conect from all ...
1
vote
1answer
1k views

Getting error while creating a New Connection using Studio 3T for Mongo DB

I tried to create a new connection with Studio 3T for Mongo DB. I don't have a previous DB connection and this is the new one that I am trying to create it. I can't able to figure out why this is ...
3
votes
1answer
474 views

Hosting Multiple MongoDB Databases on the same MongoDB Instance/Cluster

In MongoDB there are the following conecpts: A MongoDB database exists as a logical unit on a MongoDB Instance which is either a singleton or a cluster running within some number of mongod processes ...
1
vote
1answer
191 views

MongoDB UserNotFound when starting mongod

I have a MongoDB version 2.4 that i wish to upgrade to 4.0. The official solution is to upgrade from 2.4 to 2.6, then to 3.0, and so on. I am attempting to upgrade from 2.6 to 3.0, and also to change ...
-1
votes
1answer
59 views

MongoDB Performance of Overwriting an Array Field vs Individually Updating the items

The problem I am facing is basically updating the inventory when an order is received in a MongoDB database.The general hierarchy is as follows Manufacturer: { ... Items: [ ... ...
1
vote
1answer
592 views

No shardIdentity document - MongoDB

Having a sharded cluster in production which has been running for a good year now without issues. Everything is on 4.0, classic 3-3-3(config) + 2 mongos. While revisiting our back-up strategy i ...
0
votes
1answer
48 views

Ops Manager Install in Windows and connect to mongod instance started in linux

Can we install ops manager in windows and connect to mongodb instance started in Linux operating system? Does ops manager installation on windows require separate installation of mongoDB instance on ...
0
votes
1answer
75 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
799 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
239 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
116 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
87 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
134 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.