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

2
votes
0answers
124 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
15 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
40 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
34 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
112 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
43 views

MongoDB index strategy

I'm developing a system to back-up computers and store the files / data with retention for a while. The actual files are stored in an object store, while I'm planning to keep the metadata of the files ...
1
vote
0answers
38 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
57 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
20 views

Checking records consistency after mongorestore --noobjcheck

I had an HDD malfunction on a Mongo node. After running fsck and mongod --repair I was able to dump the needed collection with mongodump and move it to another server. However, some records appear ...
1
vote
0answers
34 views

MongoDB Replica Set: Can't Add Member/Connect

I'm building a MongoDB replicaset w/ three Ubuntu 14 servers. I'm connected to the primary server and authenticated w/ userAdminAnyDatabase and clusterAdmin privileges. When I run ...
1
vote
0answers
71 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 ...
1
vote
0answers
16 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
79 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
40 views

Error while changing the authentication - mongoDB

I had database level authentication in mongoDB, I had tried to change the password for existing user. It is throwing not authorized error. Steps i followed to change the password use wallet ...
1
vote
0answers
115 views

Best design of mongo replica set for DB read/write speed

I'm building a Node app that uses MongoDB. Whilst it would probably be fine to have node and mongo sitting on the same VPS, I want to ensure that the MongoDB is backed up and maintain high ...
1
vote
0answers
198 views

Error with Solr DataImporter using Mongodb

I've configured my environment and I've downloading Solr 4.7 The idea is make an indexing my mongodb database. For this I've installed the mongo-connector like appear here: ...
1
vote
0answers
42 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
182 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
90 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
146 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, ...
1
vote
0answers
50 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 ...
0
votes
0answers
3 views

MongoDB thinks it's running a replica?

I'm running MongoDB (version 2.4) behind a Django application served by Apache. In the past few days, I'm seeing the following error come up many times an hour in the Apache logs, on all sorts of ...
0
votes
0answers
5 views

users and roles in mongodb

Following users are created in mongodb. First user created with name "user" having read write role for "project" database use project db.createUser( { user: "user", pwd: "user123", ...
0
votes
0answers
3 views

Exception in 'hibernate.ogm.datastore.database'

I am trying mongodb with hibernate-ogm i am completely new for hibernate-ogm i have stucked with following exception. I am using hibernate-ogm 4.1 6beta version and mongodb-ogm-hibernate.4.1 jar. ...
0
votes
0answers
6 views

where did my mongo databses go?

I have various Mongo databases and when I do ls -l in my CentOS linux I can see the databaseA.0 and databaseA.ns files for each database and the file size is large enough to tell my data is still ...
0
votes
0answers
10 views

MongoDB: store image on db or file system?

I have this simple question hoping nobody has previously asked it. which is the most convenient way to store images regardless of file system space and db space? Either in the DB thanks to GridFS ...
0
votes
0answers
11 views

Documents with many potentially overlapping geolocations (maybe MongoDB)

Let's say I have a large list of coordinates coupled with the type of building is at this location (e.g., restaurant, doctor's office). In this scenario, there would potentially be many different ...
0
votes
0answers
18 views

Why does a mongo connector need 5% of server memory?

I have 2 servers, one running MongoDB, and the other running a Clojure app. The Clojure app makes some calls to MongoDB. If I ssh to the server running Clojure and run htop, I see: 28961 das ...
0
votes
0answers
30 views

mongodb import … taking very long time

I have json file of 432.6 MB, which i am uploading to mongodb database, I have mongodb setup on my OS X 10.9.4 mongoimport -d fastqdb -c seqcol --file /Users/loginname/FASTQ.json --jsonArray ...
0
votes
0answers
52 views

Failure dialing host after a time, skipping all tasks. Err: `no reachable servers`

I have been using MMS and there're 3 hosts based on Windows for monitoring. They're replica set with 1 primary and 2 secondary. Everything is OK for a long time. Recently, MMS has sent me too many ...
0
votes
0answers
37 views

Mongodb is taking up 7GB of hard drive space on VM, how do I fix?

I am running Debian on a VM. I installed mongodb and it is taking up A LOT of space. It is really slowing me down in college, with work and projects ... etc. I have a disk usage analyzer and I've ...
0
votes
0answers
14 views

Add a member in mongo db replica set

I Have Added A new Member in Replica set.And It Starts initial sync But After some point it will start resync again and again. And Log file show [rsSync] replSet initial sync pending Sat Jul 19 ...
0
votes
0answers
26 views

mongodb master slave replication

I Have Setup master slave replication in mongo its working fine for few month then after that suddenly replication fails.I have started again with initial sync but during sync after a specific point ...
0
votes
0answers
17 views

Mongo - Fetch results sorted by the number of matching values in an array object

I have a mongo Database with collections such as : [{ _id : 'one', tags1 : ['A', 'B', 'C'], tags2 : ['D', 'E', 'F'] },{ _id : 'two', tags1 : ['A', 'Z'], tags2 : ['D', 'F', 'G', 'M'] } ...
0
votes
0answers
29 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 ...
0
votes
0answers
23 views

Searching larger documents

I'm currently developing an application where I want to use MongoDB for the main database. I'm trying to store the emails metadata inside the database. My schema: user_id (integer 32bit) -- index ...
0
votes
0answers
29 views

mongodb logRotate on windows server 2008

Running mongodb on a windows server 2008 R2 as a service in trying to do a logrotate for my mongod processes. I currently have a replica set 3 replicas. when i issue the command: (rotate.js) ...
0
votes
0answers
44 views

Collection VS lots of Fields

As of the moment we are having this collections RptCustomer RptCustomerMonthly RptCustomerDaily RptStoreCustomer RptStoreCustomerMonthly RptStroreCustomerDaily RptFranchise ...
0
votes
0answers
27 views

When enable authenticating in MongoDB, how to use mongo_fdw?

I test mongo_fdw these days, It's ok when mongodb disable the auth authenticate, but if the mongo enable the auth authenticate, should we create a mapping user for the foreign table? what shoud we ...
0
votes
0answers
141 views

Are mongodb bulk inserts really increase server perfomance (and faster)?

Bulk inserts always are faster in client side because of saving round-trips, but at the server-side is there any sensible performance improve? It seems the code for bulk inserts, just loops over ...
0
votes
0answers
223 views

Mongodb: Waited too long for lock balancer to unlock

Mongo Version: 2.4.5 OS: Windows Server 2008 R2 Standard (Service Pack 1) We have a balancer idling for a day doing nothing (no recent records in changelog), holding a lock state 2. Tried to stop ...
0
votes
0answers
26 views

How to restore MongoDB production replicas from underlaying files of hidden replicas in case of human error?

When I have backed up files of my hidden replicas, how can I use it in case of human error (e.g. drop db, etc)? I mean, what I have to do to restore data from it? I probably should: stop balancer, ...
0
votes
0answers
286 views

Storing files in Mongo's GridFS vs File System

I read the question here: http://programmers.stackexchange.com/questions/150669/is-it-a-bad-practice-to-store-large-files-10-mb-in-a-database and this paper: ...
0
votes
0answers
110 views

MongoDB Sharding and Replica Set Allocation

I am going to setup MongoDB cluster: 3 config servers, 3 routing servers, 2 shards (replica set per shard). A replica set is just simply 1 primary, 1 secondary and 1 arbiter. Therefore, in my ...
0
votes
0answers
148 views

MongoDB - Assertion failure error

I am using a replica set with three 2.4.4 mongod instances, and today the primary crashed. This happened several times, and I used repair command to repair the database each time. I think this error ...
0
votes
0answers
252 views

Mongodb replica set : “errmsg” : “initial sync need a member to be primary or secondary to do our initial sync”,

I started primary and two secondary (which were previously running in master-slave config) in replica set on three machines with following commands mongod --replSet rs0 Then connected on one of ...
0
votes
0answers
37 views

About transactions on mongodb

To what extent the atomic storage of mongodb can leave your database unsafe of inserts or updates on my data? In the other words. What are the possibilities of my data not been (inserted or updated) ...
0
votes
0answers
23 views

MongoDB fall into a forever waiting after a long time insert

I have a mongodb cluster,I have a very large size of data to insert to it .But it's a pitty that the insert operation seems to fall into a pause after a day's insert operation.I tried to connect to ...
0
votes
0answers
77 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
0answers
66 views

show database command doesn't show databases

I've made the following configuration options logpath=D:\mongodb\log\mongo.log logappend=true dbpath=D:\data\db directoryperdb=true port=64623 # [mo]ngodb maxConns=100 objcheck=true cpu=true # ...