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
2answers
784 views

MongoDB YAML file problems on Windows

I managed to get MongoDB running as a three member replica on Windows 8, but I had problems with configuration files. If I used the new (MongoDB 2.6) file format (YAML) and used the replica set name ...
2
votes
1answer
410 views

MongoDB - Query elemMatch Date

Having a document structure like this: { "_id" : ObjectId("5359816b036493327d7cae95"), "_class" : "com.myproject.MyObjectDTO", "signals" : [ { "signalType" : "ABC", "quantity" : ...
2
votes
1answer
69 views

What are these files in MongoDB?

I was looking into my server and I found this: [root@host ~]# cd /var/lib/mongo/journal/ [root@host journal]# ls -lh total 3.1G -rw-------. 1 mongod mongod 1.0G Apr 7 01:18 j._0 -rw-------. 1 mongod ...
2
votes
1answer
285 views

Can arbiterOnly replica in MongoDB become SECONDARY and what it means?

The MongoDB documentation says that when a replica is added to the set as arbiterOnly=true it will not become Primary. But can Arbiter become a secondary and what does it when it does? I have a ...
2
votes
1answer
501 views

mongodb distinct() in an array

In my mongodb database,there is only one document below: { "_id" : ObjectId("5226efc5ccf23796f9590f67"), "count" : NumberLong(126045), "eissn" : "1466-5034", "grade" : 0.0, ...
2
votes
1answer
523 views

How much free space do I need for mongoDB? and how to reclaim lost space?

I ran out of disk space on my mongo database. I saw it and dropped some collections (120 out of 1700 i had). And ran db.compact(...) thinking it would release free space. well, that was a stupid idea. ...
2
votes
1answer
132 views

Improving concurrency in MongoDB via sharding

Our current setup: Cluster of ~500 ec2 c1.xLarge worker nodes with 8 threads on each running scientific simulations Results temporarily stored at runtime on each worker node's local MongoDB, using ...
2
votes
1answer
461 views

MongoDB: move documents before capping

The cappedCollection concept works well for most of my projects where cleaning old data without care makes sense. For another projects, I need a more complex and safe concept. The requirement is ...
2
votes
2answers
336 views

Schema design for privacy settings in MongoDB

I have a set of documents that can have various privacy settings around them: They can be completed public (any registered user) can view them They can be viewable only by people following you (this ...
2
votes
1answer
22 views

Mongodump on Replica Set

Running backups on a Mongo Replica set - 1 primary, 1 secondary, 1 arbitrar. Had a instance where all three stopped talking to one another and all went to secondary. I ran a backup against the the ...
2
votes
0answers
66 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
174 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
310 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
1answer
664 views

verify that mongos server is connected to config servers

I've been writing a backup script for sharded replica-sets and it's almost done, except that I can't seem to get it to successfully start the balancer back up after everything's all said and done. ...
2
votes
0answers
118 views

MongoDB advantages [closed]

I am actually can not understand the real advatage or killer feature of MongoDB storage. As I understand currently MongoDB implements exclusive per-database write lock that is even worse from the ...
2
votes
1answer
153 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
144 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
133 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
255 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
2k 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
5k 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
2answers
1k views

Disk space recovery on Mongodb replicaset secondaries

Is it possible to recover disk space on replica set secondaries based on the results of a repairDatabase call performed on a primary? I can't seem to locate anything that would work short of bringing ...
1
vote
1answer
125 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
69 views

mongodb shard chunk migration 500GB takes 13 days - Is this slow or normal?

I have mongodb shard cluster, shard key is hashed. It has 2 shard replica sets. Each replica set has 2 machines. I did an experiment by adding another 2 shard replica sets, and it starts to ...
1
vote
1answer
40 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
988 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
105 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
2answers
145 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
273 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
852 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
501 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
2answers
20 views

Query to Secondary on Sharded Cluster

How to specify query from mongos shell which is inteded to query data from secondary? The goal is not to bother primary load on write and use data in secondary shards instead.
1
vote
1answer
170 views

Sample YAML Configuration Files for MongoDB?

The MongoDB configuration options documentation lists all the available options that can be specified, but does anyone have a set of fully formed example YAML formatted config files for MongoDB ...
1
vote
1answer
27 views

How to isolate 1 MongoDB config server

I need to preform a rolling upgrade on my MongoDB. I've been all over the Mongo documentation and I can't find a solution to my problem (if there is one) Here's a simple sketch of the Architecture: ...
1
vote
1answer
95 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
148 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
68 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
91 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
106 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
208 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
582 views

MongoDB insert performance rapidly dropping

I'm currently experiencing a rapid decrease of the insert Performance. I have a rather simple data model { "Id": "ObjectId", "SomeProp": "xy", "SomeTags": [ { "key": ...
1
vote
1answer
172 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
120 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
76 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
683 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
65 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
112 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
140 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 ...