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
1answer
141 views

Memory management scenario with MongoDB

I'm implementing a medium scale marketing e-commerce affiliation site, which has following estimates, Total Size of Data: 5 - 10 GB Indexes on Data: 1 GB approx (which I wanted to be in memory) Disk ...
2
votes
1answer
122 views

Does Mongo have disappearing/phantom writes

I have heard that Mongo has something like phantom writes. For example, if I have a web request with the following db commands in a single unit of work: a) update comments in article b) update ...
2
votes
0answers
128 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 ...
2
votes
2answers
3k 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 ...
2
votes
1answer
213 views

Best embed/reference/field strategy for many inserts (mongo)

I'm building a gaming backend with Mongo, and have some issues on how to best design the schema to maximize performance and database size. My models: User Match -ReferenceMany (User) ...
1
vote
2answers
1k views

MongoDB - Should I separate the journal and the data to different drives?

I have seen and heard from multiple sources that it can be a good idea, performance-wise, to write your db journal and your data files to separate disks. What's the recommended way to do this (e.g. ...
1
vote
2answers
2k views

Write Locks in Mongo DB

I read somewhere that mongo db holds db level write lock, does this mean that when someone updates any collection others are not allowed to read other collection or how it works. Also when someone ...
1
vote
2answers
1k views

Mongo DB Cant Start

Evening we have had a mongodb running fine for a few weeks and all of sudden it has gone down. We are unable to start it back up as it is complaining that the "dbpath (/data/db/) does not exist" I've ...
1
vote
2answers
4k views

To find a version for your pc check with the software publisher install mongodb

I want to install MongoDb on windows 8 but when i try to run C:\mongodb\bin\mongod.exeiget this error: To find a version for your pc check with the software publisher.
1
vote
1answer
2k views

What does reslen and other means in mongodb log?

database.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.772835, -6.186753 ], $maxDistance: 0.04498373205078301 }, Prominent: { $gte: 15 }, indexContents: { $all: [ /^aru/, /^op/ ] } } ...
1
vote
1answer
124 views

Where do caching servers conceptually fit in my architecture?

Given the simple well-known architecture below: Where (conceptually) does the caching server(s) sit?
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
1answer
528 views

How do I (safely) kill long running operations in MongoDB?

Occasionally operations get out of control in MongoDB and might end up running for hundreds of seconds, and impact performance until they are killed or completed. When that happens, I know I have ...
1
vote
1answer
89 views

Mongo db and sharding / replica sets concept questions

I have few questions about sharding and replica sets: I am planning to write important logs to a sharded environment. about 100 million rows in a day, If I will connect to a single MONGOS process , ...
1
vote
1answer
400 views

How does MongoDB store data in RAM?

I'm trying to sift through the remains of an event that was causing us a lot troubles. Aside from report to management about what happened, I'm trying to gain a much better understanding of how this ...
1
vote
2answers
129 views

Does mongodb support non readable file?

I have uploaded PDF/PST file in mongodb by mongofiles but by retrieving them in R(BSON) and converting it to "Character" type i didnt find the PDF/PST file,so is it possible to upload PDF file or PST ...
1
vote
1answer
246 views

Books to start with big data [closed]

I would like to start learning about the big data technologies. I work in this area in the future. Does anyone know good books to start learning about it? Hadoop, HBase. Beginner - intermediate - ...
1
vote
1answer
726 views

$nearSphere returns too many data. What am I missing? Am I wrong? Is it a bug? Does other see the same thing?

I noticed that $near and $nearSphere returns completely different data and I got suspicious. After all, when latitude is near equator it sphere distance shouldn't differ a lot from euclidean distance. ...
1
vote
1answer
450 views

mongodb: replica-set processing reads on the primary

Running a replica-set with 1 primary and 2 secondaries, I wonder why the READs are also done on the primary. Shouldn't the primary mainly do the WRITEs and the secondary can share the READ-load?! I ...
1
vote
1answer
34 views

MongoDB ReplicaSet reconfig when primary and majority don't exist

http://docs.mongodb.org/manual/tutorial/reconfigure-replica-set-with-unavailable-members/ Is there anyway to reconfigure a replica set in the event the primary as well as a majority of the servers ...
1
vote
1answer
48 views

MongoDB performance problem

I have a MongoDB for storing result like this {_id, type, imei, lat, lng, spd, dir, time} {_id, type, imei, lac, cid, time} If type is f first one is used and if it is l second one is used. Here ...
1
vote
1answer
61 views

Delayed replication false alerts and migration delays

I am running mongo 2.6.1 on a 3-shard cluster. Configuration is: 3 data nodes and 2 arbiters. The one data node is hidden and delayed for 3 hours (slavedelay). I have hidden the node in order to ...
1
vote
1answer
26 views

PHP/MongoDB: Unset all fields in a document

I want to use PHP to remove documents from a MongoDB collection, but it's a capped collection (and it's stuck that way until I can get more memory), which means I can't remove documents. I have to do ...
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
95 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
vote
1answer
121 views

Why MongoDB starts to split before 64MB

I'm testing the MongoDB Sharding with a Sharded Collection and a forloop to insert arround 1M documents to see how splitting and moving works. I'm surprise that after few documents MongoDB starts to ...
1
vote
1answer
75 views

Maintaining mongodb for a huge list of message “documents”?

Intro: I am working on an app right now for live messaging and it's almost complete. The database strategy is in order. So when a new message is created it is sent as an object fitting my mongoDB ...
1
vote
1answer
69 views

What synchronizes two delayed replicas, which is part of the replica set, included in sharded cluster?

Please take a look at my mongodb map at http://postimg.org/image/krzvmep4d/ What synchronizes two delayed replicas, which is part of the replica set, included in sharded cluster? How can I use my ...
1
vote
1answer
187 views

mongosniff is missing in mongo package

I installed mongodb-10gen version 2.4.6 in Debian. This package does not include mongosniff. How can I install a pre-built version of mongosniff in Debian ?
1
vote
1answer
449 views

MongoDB Keys and casting between types

This is more of a theoretical question: Let's say I have a collection of documents, my_collection: { "_id": ObjectId("52c679ac7a23e6225b62c51f"), "date": ISODate("2014-01-06T03:48:30.737Z") ...
1
vote
1answer
56 views

Based on what criteria voting take place in MongoDB?

Suppose a replication set R1 contains one primary, 2 secondary and one arbiter node. Voting will happen if the primery node goes down. Based on what criteria secondary members will vote to select the ...
1
vote
1answer
108 views

How would I change this relational model to fit a nosql database?

Because of things beyond my control, I have to switch from a relational database to MongoDB for the advertising platform I'm helping to build. I've got a relational schema sketched out, but I'm unsure ...
1
vote
1answer
98 views

Which database is designed for storing and incrementing values?

We're trying to build a stats server that stores visits for each document on a section for a specific date, so we need a table that has the following parameters: documentID sectionID date visits ...
1
vote
1answer
139 views

Riak in SasS application

I am thinking about using Riak for a SasS application I started working on recently. I was originally thinking about MongoDB but after running into Riak it seems like it may be the better option. The ...
1
vote
1answer
163 views

What's the fastest way to replicate data?

I have a mongodb database data on my computer. I want to upload that into amazon.com server. The bottle neck is the internet connection. One way is to zip the file and then upload it to the server. ...
1
vote
1answer
83 views

How can I automate sharding in the presence of continuous reads

I am using a pymongo in a sharded mongo environment. I have some fairly write-intensive systems, so I split the data up by time, with one database per hour, so the heavy-lifting of index-updates can ...
1
vote
1answer
9 views

MongoDB - Replica sets - Syncing and DC issue

I have 3 instances of MongoDB running on my local machine. One is native and the other two are on a Virtualbox Windows 7 VM. LocalMongo = My local mongo. VM1a and VM1b = My two instances of mongo ...
1
vote
1answer
48 views

Update tag range on MongoDB range shard

Let say I set a min and max key for shards using range tags. Later I find out that the tag range I defined will not balance. Then I have to change the tag range value. I have searched MongoDB's ...
1
vote
1answer
18 views

Difference between mongod and mongodb upstart jobs

I just noticed that there are two possible ways to start mongodb: service mongodb start (uses /etc/mongod.conf) service mongod start (uses /etc/mongodb.conf) Can someone tell me what's the ...
1
vote
1answer
20 views

MongoDB: how to create a new database

After installation, test,admin and local are the default database. As per the MongoDB tutorial, when we insert data in collection a database will be listed in show dbs command. For a specific purpose, ...
1
vote
2answers
14 views

How to determine database read/write ratio on MongoDB MMS?

By looking at MongoDB MMS charts, is there a way to calculate a database read/write ratio, or roughly determine whether a database is read-heavy or write-heavy? Assume I do not have contact with ...
1
vote
1answer
54 views

Understanding document size in MongoDB

My collection.stats(): { "ns" : "csdbprotobuf.archive", "count" : 429787895, "size" : 48374032272, "avgObjSize" : 112, "storageSize" : 56527326864, "numExtents" : 47, ...
1
vote
1answer
23 views

mongodb: maxTimeMS ignored

After trying with different drivers and clients, we suffer with mongodb timeout on find query. Even Profiling logs the settings and issue well. 2014-08-13T23:46:43.218+0200 [conn80] query ...
1
vote
1answer
39 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
79 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 ...
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 ...
1
vote
2answers
154 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 ...
1
vote
1answer
51 views

Mongodb sharded cluster backup user issue

We're using a simple python script to backup our mongodb cluster. the script connects to each mongod instance via ssh, and performs mongodump, all without requiring user/pass ever since we started ...
1
vote
1answer
116 views

Mongodb: slow shard balancing

I've decided to shard a collection with 500M+ documents into 24 shards. All shards are on the same machine without replicas as was advised in this title (core sharding). The shard key is {"_id":1}. I ...
1
vote
3answers
202 views

How to limit MongoDB database size

Are there any mechanisms to limit the size of a single database on MongoDB 2.6? I found some options like quota, quotaFiles and nssize but am unsure how to use them.