MongoDB is a scalable, high-performance, open source, document-oriented database. It supports a large number of languages and application development platforms. Questions about programming should be asked on http://stackoverflow.com.

learn more… | top users | synonyms

4
votes
0answers
42 views

Remove a shard in MongoDB

I have a MongoDB cluster, I accidentally hosed a shard, I don't have a backup. It's pretty easy to recover the data, but after issuing the removeShard command, it says it's draining. However, the ...
2
votes
0answers
25 views

Mongodb incremental backups

I was given the task to setup incremental backups for mongodb replicaset, as start point of course I googled about it and could not find anything on mongodb docs, I did find however this question ...
2
votes
0answers
41 views

Why is our Non-Mapped Virtual memory usage high when running MongoDB (MMAP) on CENTOS

Our non-virtual virtual memory usage on our Linux MongoDb instances seems high, currently sitting just over 2GB. The instances are running a minimal installation of CENTOS (no GUI) and they acting as ...
2
votes
0answers
25 views

MongoDB C# driver fails to reconnect after stepDown

I have an Elastic Beanstalk environment in AWS that constantly verifies the DB is accessible by querying the mongos for one document. We only speak to the DB routers and not to specific instances. ...
2
votes
0answers
192 views

Error while creating an admin user in replica set

I have a relatively simple replica set test setup between two VMs and my host machine, with VM1 as primary, VM2 as secondary and the host as arbiter. I have mongodb 2.6.4 installed on all machines. So ...
2
votes
0answers
357 views

Mongo not using enough RAM, and is slow

Our Production Mongo appears to be behaving weirdly. As far as I have read, Mongo should eat up all the available RAM to cache Index and Data in memory but in our case it is not doing so. Our ...
2
votes
0answers
817 views

“Host has low open file limits” error in MMS

I am running Standalone MongoDB (v 2.6.0 64-bit) host on Centos (v 6.5). Centos is guest OS on Windows 7 host running under VirtualBox (4.3.10). MongoDB process runs under root account. And it is ...
2
votes
0answers
261 views

Store large hierarchy in NoSQL each day and compare

I'm in the process of creating a utility that stores a fairly large hierarchy into a NoSQL document. The data of this is similar to an Active Directory / LDAP structure which contains sub groupings, ...
2
votes
0answers
145 views

automated data sync after Primary node is down

I have this scenario, using version 2.2.2: Node A, Primary, Priority: 10, Wireless network Node B, Secondary, Priority: 9, VM Server1 Node C, Secondary, Priority: 8, VM Server1 Sequence: In Node ...
1
vote
0answers
13 views

mongodb is using most of disk space for journal and not cleaning itself

I am using mongodb on production with journal enabled. I am using mongodb to store application data and also using gridfs to store images. I am using Elastic Block Storage (EBS) with 10GB for each ...
1
vote
0answers
14 views

MongoDB user account required for arbiter?

I have a test environment with two mongo v2.6.5 instances (#1, #2) and an arbiter instance in a replica set. I have a a common key file configured for all three instances. I have created an admin ...
1
vote
0answers
13 views

Should mongodb be run in a service, or a worker cluster?

I'm trying to implement an architecture that's similar to the coreos's production architecture (shown below) Should I run the database as a central service or one or more of the workers? I figured ...
1
vote
0answers
29 views

mongoDB - how to link one embedded object to another embedded object

Background Information I'm trying my hand at my first mongoDB database. So far, I've decided that I will need to use both references and embedded data models. One of the features of this application ...
1
vote
0answers
66 views

Docker Mongodb replication on different hosts is not working

I am trying to setup a mongodb replication in Docker containers running on different hosts. Please find the steps below: In a VM1 running ubuntu 14.04, installed docker, then created container C1. ...
1
vote
0answers
114 views

Creating Pandas DataFrame on Python From a MongoDB Document containing Embedded documents

I am working on a machine learning algorithm on python's scikit.learn, but this time the data are in Mongodb documents format. I would like to pull my data into a dataframe. Here is an exemple of the ...
1
vote
0answers
25 views

Replica Set In Mongo Are All Primary

So I saw a thread on here for when all the replica sets are Primary. The fix was to do rs.Add(hostportStr) on the master server before you do rs.initiate() on the server you want to become a ...
1
vote
0answers
57 views

Mongo 3 Intermitted Crashes

Currently running two VMs with fresh installs of Ubuntu 14.04 x64 and Mongo 3 Stable. Each VM has the same specs with 8 cores and 56GBs of RAM. Our processing VM is doing great under heavy loads, ...
1
vote
0answers
41 views

Mongodb schema design validation

I am building an app which allows users to do some "tasks" to earn points. The "tasks" are part of a "campaign" which themselves are a part of "brands". I am confused about the schema for storing the ...
1
vote
0answers
52 views

Good way to store daily train data in MongoDB

I am preparing to collect large amounts of information about trains in my country. Each train in my country has a number. I've already collected all of these numbers. There are about 4000 of them. ...
1
vote
0answers
28 views

why my data is not being sharded?

I am using mongo 2.6.7 I deploy a sharding cluster follow the guide: http://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/ My sharding cluster include: - two replica sets (one primary + one ...
1
vote
0answers
109 views

How I can create user defined roles

I have a database in mongoDB 2.6.4 in which I want to restrict the users as per their level. I want to give read privileges to some users and insert/update privileges to some other users on a ...
1
vote
0answers
54 views

Nosql multiple database design to handle sharing scenarios

This question is regarding design of a database in mongodb. The scenario: A user has a drive which he can share with others. Drive has two categories: docs and others. The user has three choices in ...
1
vote
0answers
59 views

MongoDb Volume alert so much iops(>10000)

I am new for MongoDB. I have setup mongodb for my production server. I have setup alert in aws ec2 instance for iops and it gives me alert every 15 minutes that iops reached at > 10000. I am not ...
1
vote
0answers
125 views

Pentaho Kettle (Data Intergration) MongoDB Aggregation

I'm using kettle v5.2 which support the aggregation pipleline in MongoDB when using MongoDB input the query works for small data set but I need to use option allowDiskUse to the query can't figure ...
1
vote
0answers
2k views

How can I load csv data into mongodb and choose the types I'd like to have created for each column?

I'm looking for a way to load csv data in mongodb and specify the types that I'd like to have created for each column? I've been using mongoimport but I find it quite painful because there doesn't ...
1
vote
0answers
134 views

Replica failed with error mongo db

I am running mongo sharded cluster with two replica set as shards. One set is working fine but replica secondary on other replica set is not working. When ever i restart it it gives me this error and ...
1
vote
0answers
56 views

Mongo stuck on save

We have a single node of Mongo holding data in a single collection. We run it on windows 2008 64-bit machine with 128 GB RAM. The size of the collection is ~2TB holding ~200M items. Lately, when we ...
1
vote
0answers
382 views

Positional Operator Matching Nested Arrays Workaround?

As was just pointed out to me on stackoverflow, Positional Operator Matching Nested Arrays has yet to be made available.. I need to display read.marked:true replies differently than read.marked:false ...
1
vote
0answers
72 views

MongoDB read performance

I have an ingestion process which loads data into a specific collection at a very high rate. Some of these documents have to be loaded into another system in batches of 100K . Means as soon as I find ...
1
vote
0answers
54 views

How to check which sql statement is causing global lock

We are monitoring mongodb Database using MMS and it is showing 15-20 sec global lock. But we can't find any statement is taking more than 2-3 sec. I like to know which is causing so much global lock ...
1
vote
0answers
300 views

MongoDB communication issues on Azure

I have a Python uWSGI app running behind Nginx using pymongo to communicate with a 4 machine replica set running Mongodb 2.6.3. The replica set is configured using domain names for each machine ...
1
vote
0answers
102 views

mongodb replicaset

I am adding a new member in ReplicaSet and it starts initial sync bur after certain point sync break and start resync again.this process continue and never complete its initial sync.so please resolve ...
1
vote
0answers
350 views

Error to connect mongos when trying to create replicated sharded cluster

I'm trying to create an replicated sharded cluster in mongodb. Initially I've created two shards and there are a replica set with three members in each shard. And all the shards and replicasets run in ...
1
vote
0answers
284 views

mongodb balancer does not move chunks because of obscure error

After carefully following this guide, on how to migrate a 3 member replica set to a shard containing 2 X 3 member replica sets, after sharding one of my collections nothing happened. Looking into the ...
1
vote
0answers
21 views

Modeling for inclusion of two different entities

What I Have I am currently hashing out the data model for an application that will utilize MongoDB. In my setup, users or members (as they are called in the schema) will be created and then assigned ...
1
vote
0answers
319 views

Restore backup to staging replica set

I have a staging environment with Mongo replica set which I refresh on a regular basis. Refresh is done automatically using a bash script. Staging replica set consists of 3 members (primary, ...
1
vote
0answers
70 views

mysql vs mongodb cache/load balancing

I have a system where users can 'like' content. There will likely be many hundreds of these likes going on at once. I'd like it to be AJAX driven so you get an immediate response. At the moment I ...
1
vote
0answers
361 views

MongoDB performance limits of mongo

There are 100 data files, each with 60 fields and over 4 million records. There is a perl program that inserts the records or updates them based on an userdefined _id field. There is also a History ...
1
vote
0answers
148 views

MongoDB secondary heartbeat hangs

We have got the same issue in two replica sets in AWS cloud. According to rs.status() on primary secondary jumping between SECONDARY and unhealthy states. With period of 10-20 seconds. In logs I see ...
1
vote
0answers
211 views

How can I use mongoDB efficiently in this scenario?

I'm trying to build a system of documents that have hundreds of tags assigned to them, but each document-tag association has a certain condition it has to also meet so the document would be returned: ...
0
votes
0answers
13 views

Running out of disk space when removing documents error

I'm trying to remove unused document from a production instance of MongoDB but, when I try to execute this query: db.collection.remove( { date: {$lt: new Date((new Date())-1000*60*60*24*90)} } ) ...
0
votes
0answers
18 views

MongoDB create user readWriteAnyDatabase but without the ability to create new DB

I want to create a single user who can read and write to any existing DB, but wouldn't be able to create new DBs. I want to give that privilege only to the dbAdmin. I have tried to create a user with ...
0
votes
0answers
19 views

Mongodb exception in initAndListen

My MongoDB server was full so Mongod service could not start. There was a specific db that I didn't need, so I have deleted its file from the dbpath. Now when I try to start the service again I'm ...
0
votes
0answers
20 views

MongoDB fsyncUnlock won't unlock occasionally on Windows

We have a MongoDB replica set installed on Windows servers, with a scheduled backup job. MongoDB is configured to use journaling. The job runs db.fsyncLock() via script on MongoDB (primary server), ...
0
votes
0answers
25 views

Real time reporting on Mongo

I have my transactional data store as MongoDB cluster on which I need to setup real time reporting(may be a lag of 2 hours will suffice) Data size - 300GB with 20,000,000 rows and 40 columns and ...
0
votes
0answers
26 views

What is the sequence to enable the authentication in mongodb cluster without stopping the service

Assume that the cluster is running with authentication disabled. There are one mongos instance, 3 config servers, and two replication sets. each replication set has 3 mongod instances. My order is ...
0
votes
0answers
58 views

Restart failed mongodb replica set instance under docker

I am trying to simulate when the master mongod instance shuts down for some reason in mongo replica set. So I took I docker file from here: ...
0
votes
0answers
47 views

Best way to run an ETL on a production MongoDB database

We have the following environment: 3 servers + 3 replica set servers Each server has 3 shards Our main collection has around 40,000,000 documents that average at around 6kb Our shard key is ...
0
votes
0answers
26 views

User with more than enough permission, cannot query collection

I'm in mongo shell. I'm authenticated as a user with way beyond enough permission to simply query a collection. Yet I cannot. Here is the user permissions... What am I doing wrong and/or missing? ...
0
votes
0answers
85 views

Mongodb replica set across AWS regions or subnets or data centers

I seem to have run into a blocking problem. I want a certain collection to be replicated across multiple AWS regions/subnets/data centers (eg a global lookup table or a global user credentials table) ...