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

1
vote
2answers
42 views

How do I explicitly define data types for a MongoDB collection?

How do I explicitly define data types for a MongoDB collection? I understand that in Mongo if a collection doesn't exist it will create it when you insert the document, but I know the fields and data ...
1
vote
1answer
36 views

How we can take backup oplog on every hour and apply on top on full backup for mongodb

We have full lvm snapshot backup. We are trying to take oplog backup in every hour and save as a file. We like to apply the oplog backup on top of full backup if we need to. We like to know how we can ...
1
vote
1answer
37 views

Should all machines which run mongo instances (mongod or mongos) in a Mongo DB cluster have unique hostnames (also at OS level)?

I have been using Mongo DB Cluster for some data analysis (Mongo DB version 2.4.5) and while inserting some data into the cluster, I found an error which is the same as mentioned in the bug : ...
0
votes
1answer
44 views

Updating mongo sharded cluster without down time for mongod

I am trying to update my mongo sharded version from 2.4 to 2.6.3. I have some queries on steps to update this. When I will run one mongos with the --upgrade option, will it update all the config ...
1
vote
0answers
24 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
46 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
1answer
28 views

What folders should I check to see if these MongoDB applications are installed on my server?

I have a CentOS (Linux) server and looked at the /bin directory, but don't find the applications listed below. What folders should I check to see if these applications are installed on my server? I'm ...
1
vote
0answers
41 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 ...
0
votes
0answers
22 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
41 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
2answers
30 views

MongoDB data directory space is increasing

I have a worry, mongoDB data directory space is increasing very rapidly: I have a two data files and each one has reached 2GB limit and starts spawning 2 GB file multiple files. Is there any where I ...
1
vote
2answers
47 views

MMS is assigning same alias to two data nodes of different shards and replicasets

I am using MMS to monitor a 13 node MongoDB Cluster(3 Config Servers, 4 MongoS, 2 replica sets with 2 members + 1 arbiter each). MMS was working properly since its installation, but now it is not ...
0
votes
1answer
61 views

Mongo large chunks will not split

I had a 3 shard set up, and ran out of capacity, so I added 3 more shards. (Each shard is a replica set). But the data isn't spread across the cluster evenly. I have my chunkSize set to the standard ...
0
votes
1answer
22 views

Data Migration or Sharded Cluster to new Cluster

We have Sharded Mongo Cluster. However some documents are sharded and others are unsharded. We are planning to migrate these databases to new cluster. Please update if there is any process or steps ...
0
votes
1answer
26 views

MongoDB syncingTo change

I have a 3 members replica set version 2.6.1 with following configuration "_id" : 0, "host" : "10.125.16.22:30000", "priority" : 2 ...
1
vote
0answers
128 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 ...
0
votes
0answers
91 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 ...
1
vote
1answer
75 views

Mongo sharding issue with chunk split and Data transfer

I am getting this error in my primary shard warning: moveChunk failed to engage TO-shard in the data transfer: still waiting for a previous migrates data to get cleaned, can't accept new chunks, num ...
0
votes
1answer
22 views

Why mongo write only one partition

The /dev/mapper/vg_db1-lv_root partition used 100%,but the other partition is free,why mongodb store data only use this partition. This is why? How can I solve this problem? [root@db1 shard11]# df ...
0
votes
0answers
62 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 ...
1
vote
1answer
51 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
55 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 ...
0
votes
0answers
29 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 ...
1
vote
1answer
90 views

Tuning Mongo (TokuMX) for fastest bulk reads

What options do I have for tuning MongoDB / TokuMX for reading the results of queries with large result sets? I'm currently on a single server (no sharding) with the data on an SSD drive. My queries ...
-1
votes
1answer
32 views

Disable MongoDB journaling?

Are there any benefits in disabling mongodb journaling besides performance gain? I know journaling provides write durability and crash resiliency. But I can tune syncdelay parameter to make data files ...
0
votes
1answer
23 views

mongodb - “replication oplog window” possibly reduced due to profiling - when profiling disabled no change?

PROBLEM I have a 3 member replica set (no sharding) running mongodb version 2.4.8. Using MMS (Mongo Monitoring) I can see that on 7th July 2014 at 12:00 my "replication oplog window" dropped from ...
0
votes
0answers
41 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
1answer
26 views

How to confirm that chunk transfer is completed on a DB

I have one case where i create db for Daily data. I have some collections in this db which are sharded. My requirement is as follows: Create every day DB If There is a DB which is more than 7 days old ...
1
vote
0answers
83 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 ...
0
votes
1answer
33 views

MongoDB SSL Certs

I have built MongoDB with support for SSL and am wondering how it works with certs signed by a certificate authority? I have a wild card cert for the domain, so if I have mdb(1|2|3|4).domain.com and ...
0
votes
1answer
38 views

Can we have more than one arbiter in monogodb replica set

I am setting up cluster of my webserver which uses mongodb. I am doing replica set of mongodb.I have only two machines. So can I have two arbiters in replica set ?
0
votes
1answer
40 views

Is using a relational DB for storing votes and (accessed resources) overkill?

I am writing a forum component for a site and would like to keep track of what topics/questions a user accesses so that other topics/questions can be recommended based on said users previous choices. ...
1
vote
1answer
45 views

Setting stack-size ulimit for mongodb to reduce connection overhead

I am using MongDB 2.4.9 and working on performance tunung. With reference to the ulimit settings for mongodb, in my linux environment (ubuntu 12.04) the default setting for ulimit -s is 8192. MongoDB ...
0
votes
1answer
94 views

Heavy load of one of shards in MongoDB

I have a problem with one of our shards. For some reason I'm getting the next usage 15:38:42 up 4 days, 10:28, 1 user, load average: 3.67, 3.50, 3.56 In the mean time all other shards are ok. ...
1
vote
1answer
31 views

Partial access MongoDB databases without replication. Is that possible?

Is there any possibility to deploy a structure in case if when one or two mongod(s) in sharded cluster will be unavailable, so we'll be able to read and write partial results in\from remaining shards? ...
1
vote
1answer
37 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 ...
0
votes
1answer
68 views

MongoDB page faults even when all data is in resident in RAM

I have made a sample app that emulates what my real one does. It simply iterates over all documents of a specific collection over and over. I start mongo (as a windows service) and mongostat shows ...
1
vote
2answers
141 views

How to activate load balancer in sharded MongoDB

I have a very simple MongoDB database structure. Also I have 5 shards in it (3 of them are replicasets). But we testing DB loading and it seems that load balancing doesn't currently enabled. On mongos ...
0
votes
1answer
23 views

Is there any relation between BSON storage for mongoDB and MySQL storage?

I am working on an application where I need to make analysis that what will be the storage size of BSON structure if same data is stored which is stored in MySQL. Basically I am comparing MongoDB and ...
1
vote
1answer
74 views

MongoDB Shard - Disable Cursor timeout

I'm using an sharded-cluster(Mongo version 2.4.1) with a java application. After a specific time (10 minutes or more) I got the following exception: com.mongodb.MongoException$Network: Read operation ...
0
votes
0answers
25 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'] } ...
2
votes
2answers
86 views

Is it always faster to create indexes after loading data?

I have a large number of records (~1 billion) that I need to load into MongoDB (actually TokuMX, but whatever). I have about 6 different indices I need to create on the collection. Is it always faster ...
0
votes
1answer
97 views

MongoDB: Manual failover and failback between two datacenters?

This is about MongoDB and datacenter failover and failback. We're thinking about using two datacenters and this MongoDB replica set: DC1-M1 prio 1, votes 1 (datacenter 1, member 1) DC1-M2 prio 1, ...
0
votes
1answer
23 views

Mongo DB - reading during update

Is it possible in a three-member-replica set (1 primary, 2 secondaries) to update records on the primary, or even delete several records and insert the updated data, and still execute read-ops on the ...
-1
votes
1answer
65 views

how to split the chunks in sharding

I have edited the question. I was trying to run the sh.splitAt mongos> sh.splitAt("test.zp",{"city": "1"})it worked. But the problem is at sharding chunks. when i have run the command ...
0
votes
0answers
46 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
1answer
44 views

Mongo DB Backup & restore

0 down vote favorite I have a DB with 150GB of data's . Am using MongoDump and Mongorestore method to back and restore. My Production server is running with Mongo 2.2 and Test server is with 2.6.1 ...
0
votes
1answer
66 views

MongoDB - temporarily turn shard to standalone for local user creation

Following question Mongodb sharded cluster backup user issue I have a sharded mongodb cluster, with 4 shards, and I'm required to stop the mongod service on each shard, and start it not as a part of ...
3
votes
1answer
115 views

MongoDB presplitting chunks for compound shard key

In my mongodb setup I have a compound shard key {"region" : 1, "foo" : 1, "bar" : 1} and I know the values region can be and that each region should be on one chunk. Therefore I'd like to pre-split ...
0
votes
1answer
91 views

Huge size on mongodb's gridfs. Should I compact ?

I'm running mongodb and grid.fs to store small files (less than 20mbs). These are part of a replica set. I currently have more than 350000 files stored. I've noticed that the chunks collection takes ...