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

learn more… | top users | synonyms

0
votes
0answers
7 views

Mongodb cluster deployment

I am new in mongodb and I am trying to deploy a mongodb cluster and I am following: https://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/ I initiated Config Server Replica Set and after ...
0
votes
1answer
124 views

What are minimum configurations for mongodb replica set though a java program

I'm new to morphia. I'm using morphia and mongo-java-driver.jar to talk with replicaset(I need for cluster also) through a java program. I'm new to morphia. Wrote a sample program code is below ...
2
votes
2answers
140 views

Deciding EC2 Instance type & Volume IOPS for Mongo DB

We have 500GB data in our Mongo(v2.6.3) including the indexes. We currently run this on AWS m3.large(8GB RAM) instance. Yes, Single machine. Our MongoDB Cloud Manager shows these stats: ...
0
votes
0answers
15 views

Mongodb database design

I'm planning to implement this schema in Mongodb, I have been doing some readings about schema design, and the notion was whenever you structure your data like a relational database you must be doing ...
2
votes
1answer
378 views

Mongo replication lag slowly increasing

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
0
votes
2answers
32 views

What is considered as a document in mongoDB?

I have been learning MongoDB for the past two days and I've been confused with documents and their limits, and how to overcome the limits. What is a difference between documents and collection?
4
votes
2answers
2k views

Limit memory used for mongoDb

Is there any way to limit using RAM for mongodb on Debian? I'm looking for a solution fo about 8 hours, but have no results.
0
votes
1answer
2k views

cannot log in to mongo from command line - using MongoDB 3.0 and WiredTiger - I've followed all instructions

NOTE: I have tried not setting bind_ip and also setting it to 0.0.0.0 -- neither one fixed my issue. This is my mongod.conf file: systemLog: destination: file path: "/root/mongodb.log" ...
2
votes
4answers
634 views

Limit the RAM memory usage in MongoDB

I am using MongoDB-2.6.1. Is there any way to limit the RAM memory usage? For example: Out of 4 GB RAM, let MongoDB use till 3 GB (<= 3 GB).
0
votes
0answers
8 views

mongod crashes with “Invariant failure getExtent( a )->xprev.isNull()” message

I am trying to start a mongodb server with the database, that is located on portable drive. I know barely nothing about the internals of this particular database. There are 647 database.N files, 2G ...
0
votes
0answers
19 views

Choose Database for financial application. Mongo DB or RDBMS [on hold]

I am converting Excel financial application (dealing with stocks) into web application. I am confused which database I use Relational Database or NoSQL. I will update daily 30K rows from api, also ...
0
votes
1answer
1k views

Issue while restarting - mongdb

I had tried to start the mongodb service using the following command in linux machine. service mongod restart I am getting the following error Stopping mongod: ...
0
votes
1answer
102 views

MongoDB Tag-Aware Sharding Workflow

I wonder the work flow of sharding cluster in Tag-Aware Sharding. --- Sharding Status --- sharding version: { "_id" : 1, "version" : 3, "minCompatibleVersion" : 3, "currentVersion" ...
1
vote
1answer
16 views

how to get recordStats in mongodb 3.2?

I want to monitor accessNotInMemory of mongodb, before I can use db.adminCommand({'serverStatus': 1})['recordStats'] but according to mongodb doc, Changed in version 3.0: serverStatus no ...
1
vote
1answer
213 views

MongoDB: movechunk failed after adding a new share to cluster

I have a MongoDB cluster version 2.6.8, which already has two shares: share1 and share2. When I add a new share3 to the cluster, data chunk can't migrate to share3. This is from the mongos log: ...
1
vote
1answer
188 views

Selecting, filtering and aggregating in MongoDB

if we have two dataset 1-First dataset contains population data of cities in the United States of America. Each record in the dataset has the following format: { "city": "ACMAR", "loc": [ ...
0
votes
0answers
19 views

Cannot Start MongoDB

I cannot start MongoDB on Debian(Jessie 8.4 Stable). I generated the keyfile and added the path to the key file to the configuration and uncommented the "auth=true" but when I try to start the service ...
0
votes
1answer
184 views

How to setup sync between MongoDB and C# .NET Application

What is the best practice to synchronize a MongoDB remote database with a C# .NET App that would allow queries to be responded to within the local file system and update itself when there is a change ...
0
votes
1answer
8 views

How to show all users of all databases in mongodb?

I know show users or db.getUsers() can show all users in current database in mongodb, but how to list all users in all databses for ease of management as an administrator?
0
votes
1answer
142 views

Converting sql into mongodb nosql

I am trying to convert oracle sql into its mongodb equivalent version. create table my_hll as select mod(ora_hash(n), 1024) bucket, max(num_zeroes(trunc(ora_hash(n)/1024)))+1 val from previous_data ...
1
vote
1answer
723 views

How to update a field in sharded environment in mongodb using C# driver

I have successfully done loading in sharded environment. It is working fine. But when I do update in sharded environment, I am getting the error as : WriteConcern detected an error 'update { q: { ...
1
vote
1answer
32 views

MongoDB start ID and end ID

I want to insert bulk data into a MongoDB. Later on I want to find exactly the bulk I inserted. In MySQL I would have done: SELECT * FROM data WHERE id >= start_id AND id <= end_id How can ...
1
vote
1answer
441 views

what is the password to user mongodb when mongodb is installed in ubuntu?

When I installed mongodb in ubuntu, user mongodb and group mongodb are created in /etc/passwd and /etc/group. But I have no idea of the password to these user and group. I have to run mongod as root ...
0
votes
1answer
17 views

MongoDB script to backup replication set locally to a ubuntu 14.04 server

I would like to make a Daily Backup of my MongoDB from a replication set running from ubuntu 14.04 server. End goal would be to get a daily backup and write the backup to a remote or local share - ...
0
votes
1answer
24 views

How to set a mongodb node to return as the primary of a replication set?

There is this question here: How to force a mongod to become primary in a replica set? But it was not the answer I was looking for. and there is the question below, which could be related but it is ...
0
votes
0answers
30 views

Want To Learn About MongoDB [closed]

I am doing a little bit of research on MongoDB related to the following key points: (i) Experiment And Results (In which applications, MongoDB is used and what are the results) (ii) Threat To ...
3
votes
1answer
79 views

Improving mongodb read throughput for tiny database

I am given to understand that MongoDB will essentially perform like it is pulling records from memory if the working set is small. I wrote a simple MongoDB test program that inserts just one record ...
0
votes
1answer
87 views

mongodb could not find host matching read preference { mode: \“primary\” } for set?

I am deploy a monodb sharding, I have deploy a replica set in three machines: dev41:27017,dev42:27017,dev193:27017 and configsvr in three machine: dev41:27019,dev42:27019,dev193:27019 and also a ...
4
votes
1answer
345 views

Chunk Size is shown as 1 KB in mongo db logs even it is set to 300 MB

I am running a mongo cluster. Chunk size set is 300 MB but for today morning it is showing me in logs taht chunk size is 1024 Byte. I checked in current op there also it is showing chunks of 1024 ...
0
votes
0answers
9 views

MongoDB: what is the better way to implement shared record with ability to remove it by each user

I have a MongoDB record, for example, called Letter. This letter can be sent to some group of users, so many users have an access to it. A Letter can be sent in a context of Topic that is shared ...
0
votes
0answers
11 views

Data Modelling of product and product variations

I want to model product and product variations using mongodb (mongoose) I am really confused with how shall I model both I need to add stock and price to variations. Variation can be of anything (not ...
0
votes
0answers
14 views

Is there a way to find out if value exists with addToSet?

addToSet adds values to an array if the value doesn't exist. If the value already exists MongoDB will not return anything saying that it exsits. Is there a way to find out if the value exists? ...
1
vote
0answers
20 views

Solr with SQL Server or NoSQL

I am working on a POC of using Solr with SQL Server. I have a very complex data model with SQL server which required a bunch of joining and scalar functions to strip some mark up and other stuff. ...
0
votes
1answer
3k views

Storing multidimensional array in MongoDB

I am attempting to convert a large MySQL database of product information (dimensions, specifications, etc) to MongoDB for flexibility and to move away from the restriction of a column based table. I ...
1
vote
2answers
778 views

MongoDB: Server sockets closed after a few minutes

I am working with multiple AWS intances connected to the same mongo database (inside Compose.io Elastic deployment) but I keep getting the error server <url>:<port> sockets closed after a ...
0
votes
1answer
101 views

Mongodb background indexing - no progress

I have added a couple of background indexes on few collections on mongodb replicaset (3.0.2, MMAPv1 storage), and since then I'm seeing following entry in db.currentOp(true) response in all nodes ...
0
votes
0answers
18 views

Getting empty folder when using mongodump to back up my MongoDB

Basically, I have a problem with using mongodump to back up my MongoDB. This is the general syntax I use in SSH: mongodump -d myDatabaseName -o ~/backups/my_backup This is the resulting message: ...
5
votes
7answers
8k views

MongoDB doesn't start after changing the data directory

I have installed a mongodb instance using yum.. Now everything works fine. I started the service using service mongod start. It works well. Then I changed the data directory and log path in the ...
2
votes
1answer
114 views

Add new shard - always best?

In our setup, we currently have 3 shard set sharded cluster, each shard being a replica set of 3. Our writes are about to go up significantly to implement a new feature, and we know the extra data ...
2
votes
1answer
1k views

MongoDB all replica set members are “OTHER”?

I am setting up a MongoDB replica set using EC2's image: https://aws.amazon.com/marketplace/pp/B00CO7AVMY/ref=dtl_recsim_B007IBMJPI_B00CO7AVMY_3 MongoDB version 2.6.5 I have managed to set up ...
0
votes
1answer
381 views

How to access the data of collections from the .ns and other core storage files in mongodb?

My database in MongoDB was not accessible after the journal file became of the size > 1 GB . So I restarted the mongod process with a different data path to store the mongodb files in my machine. Now ...
0
votes
0answers
16 views

MongoDB collStats.size compared to collection.totalSize

I have a collection which has the following dimensions: rs0:PRIMARY> db.myCollection.totalSize() 2188206080 rs0:PRIMARY> db.myCollection.stats() { "size" : 5899660704, "avgObjSize" : ...
0
votes
2answers
476 views

Locked out of my own database through invariant() failure

I am trying to set up mongodb on my own server and connect to it remotely through my laptop. I had successfully installed the database and created my own user with admin privileges. However, when I ...
0
votes
1answer
4 views

Can't stop MongoDB process on CentOS

My OS is CentOS release 6.4 (Final) and my MongoDB version is 2.4.1. I tried: use admin; db.shutdownServer() and I got in output: assert failed : unexpected error: "shutdownServer failed: ...
0
votes
1answer
139 views

How to get all documents from a particular chunks in MongoDB?

From mongos log, I got the following message balancer move failed: { chunkTooBig: true, estimatedChunkSize: 408839903, ok: 0.0, errmsg: "chunk too big to move" } from: shard4 to: shard1 I know ...
0
votes
1answer
102 views

Why sharding does not show any improvement?

Here is what I did to test sharding performance. I have 4 servers, I ran config server and router on a server. 3 others are meant to be shards. First, I only added one shard to router, then I ran a ...
0
votes
0answers
21 views

Adding secondary via rs.add on MongoDB

I have a master and slave on linux (centOS 7). The rs.initiate(cfg) was done but its shows the below output when trying to add secondary via rs.add. I get this: How do I resolve? Version: The ...
3
votes
1answer
145 views

MongoDB: Should I combine fields for performance in limited circumstances

I have a really simple MongoDB collection: { "user": 1, "domain": "example.com", "apiAccess": true } There's an index on the "user" and "domain" fields. I always perform the same type of ...
0
votes
0answers
19 views

MongoDB Single Array or Multiple Fields

I have a MongoDB for a game, and I made a collection to store all outgoing attacks. My question is which of these models is more efficient. spearMenCount: type: Number required: true ...
3
votes
2answers
5k views

Mongo replicated shard member not able to recover, stuck in STARTUP2 mode

I have following setup for a sharded replica set in Amazon VPC: mongo1: 8G RAM Duo core (Primary) mongo2: 8G RAM Duo core (Secondary) mongo3: 4G RAM (Arbiter) Mongo1 is the primary ...