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

0
votes
1answer
492 views

MongoDB fast upsert

For non-incremental, but overlapping, imports, I worry about upserts to be very slow and locking the resources for hours. From different sources, I receive 1 json dump per day per source for up to 3 ...
1
vote
0answers
165 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
1answer
223 views

Is it safe to remove an entry in a “config.mongos” MongoDB collection?

There are old entries in my "config.mongos"; they reference hosts which previously had "mongos" running on them but no longer do. Can I safely remove those entries? e.g.,: # Old entries { "_id" : ...
0
votes
2answers
489 views

Storing dynamic data in NoSQL

I have scenario where I need to store unstructured data but the rest of my data is structured and relational. An example of the type of unstructured data is as explained below: User Type 1: How do ...
0
votes
2answers
2k views

MongoDb slower then Oracle?

I've imported 500k rows from an Oracle database to Mongodb to make some test. No indexes were added to the mongo collection. I ran a query which did one aggregation on a column and one filtering on ...
-1
votes
1answer
1k views

How quickly repiar mongo database 1TB on production [closed]

help me, production server is down every 15 min, i don't know how can fix it without lock Tue May 28 14:26:17.803 [conn7] Assertion: 10334:BSONObj size: 0 (0x00000000) is invalid. Size must be ...
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
290 views

Would Mongo's ObjectID work well in InnoDB's clustered index?

Mongo's ObjectID is defined like this: ObjectId is a 12-byte BSON type, constructed using: a 4-byte value representing the seconds since the Unix epoch, a 3-byte machine identifier, ...
1
vote
0answers
51 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
1answer
49 views

Is it possible to upgrade mongodb cluster without upgrading arbiters?

Is it possible to have running real nodes with version 2.4 and arbiter nodes with 2.0 or 1.8 in the replica set? Upgrade guides for version 2.2 and 2.4, did not tell anything about upgrading ...
3
votes
2answers
787 views

Primary replica set server goes secondary after secondary fails

I have a 2 servers replica set that, after the secondary fails the primary goes into secondary mode while the secondary is in STARTUP2 (recovering). The problem with this is that I can't use the ...
4
votes
1answer
435 views

MongoDB problems recovering a member of the replica set

I have a sharded database with 2 replica sets (RS1 and RS2) each one of the RSs with 2 servers. I had a problem yesterday with one member of the RS2, the mongod instance crashed throwing an error. ...
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 ...
6
votes
1answer
255 views

Are shards distributed randomly across machines in MongoDB or are they in order?

Are shards distributed randomly across machines in MongoDB or are they in order? For example, if I had a MongoDB cluster that was sharded across two machines and my shard key was a person's name, ...
4
votes
2answers
761 views

Sharded key-value store using MongoDB

Would like to set up a key-value store that is sharded across multiple machines. We are currently using MongoDB, is there a reason why we shouldn't use MongoDB for this purpose? We also use Redis, ...
1
vote
1answer
756 views

Is it possible to upgrade MongoDB from 2.0 to 2.4 directly

We have a replica set with 2 members and one arbiter in production. 10gen documentation states that 2.0 to 2.2 is a binary-compatible “drop-in" upgrade and so it's 2.2 to 2.4. Is it safe to upgrade ...
3
votes
3answers
727 views

Relational vs Non-Relational Database for Events Database

I'm trying to find out whether an SQL or no-SQL solution would be better for creating an events database. I'm creating a ticketing system, similar to ticket master. I know that for either ...
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.
0
votes
1answer
494 views

admin user can not login to other databases after upgrading to mongodb 2.4

I had a mongodb 2.2 database with auth enabled. but after upgrading to 2.4 my admin user can not login to any database other than admin database. I removed it from system.users then created another ...
-1
votes
1answer
522 views

Getting next and previous document

In a mongo collection I have a list of words (millions words). {word:'a'} {word:'b'} {word:'x'} {word:'y'} {word:'z'} I need to get lexical adjacent of a word. I am looking for most efficient ...
35
votes
5answers
6k views

Which database could handle storage of billions/trillions of records?

We are looking at developing a tool to capture and analyze netflow data, of which we gather tremendous amounts of. Each day we capture about ~1.4 billion flow records which would look like this in ...
10
votes
1answer
3k views

Using MongoDB and PostgreSQL together

My current project is essentially a run of the mill document management system. That said, there are some wrinkles (surprise, surprise). While some of the wrinkles are fairly specific to the ...
1
vote
1answer
322 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 ...
1
vote
1answer
245 views

Structuring data in MongoDB for a to-do list type application

This is a fairly high level question as I am in the initial stages of planning this application, and am also very new to MongoDB and document-based databases in general. Disclaimer aside, I am ...
5
votes
1answer
310 views

Overview of how MongoDB uses its various threads

On one instance I have MongoDB using ~85 threads. In lieu of having time to investigate directly, I am curious: What are the threads used for? Do they fall into a few high-level usage categories? ...
1
vote
1answer
229 views

MongoDB: Aggregation workaround by helper collection

Since I regularly run against mongodb's document size limit and also aggregation framework's group limitations >16M, depending on the amount of data I need to process, I look for a simple workaround. ...
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 ...
0
votes
0answers
16 views

Mongo replication lag slowly increasing [duplicate]

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
1
vote
1answer
153 views

Mongo replication lag slowly increasing

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
1
vote
0answers
106 views

Where Hadoop Stands at MongoDB Side [closed]

I am making a research about Machine Learning and planning to use NoSQL databases. I know that MongoDB is a powerful solution. However I want to learn that where Hadoop stands for MongoDB side. My ...
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 ...
1
vote
1answer
271 views

mongodb heartbeat - unicast, broadcast or multicast?

I can't find any good doc or article (except http://docs.mongodb.org/manual/core/replication-internals/) about this in the internet. Anyone knows how mongodb heart beat signal operates? The reason ...
1
vote
1answer
174 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: ...
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. ...
0
votes
2answers
572 views

MongoDB Master and Slave Replication - Windows or Linux

I have recently moved my MS SQL Server Database to MongoDB (2.0) on Windows Server 2008. Its containing 2 databases with following stats. (both databases get around 100 reads/writes per second). These ...
1
vote
2answers
1k views

Huge index for covered queries (indexOnly: true) or (indexOnly: false) with collection scan

I have two questions, I'll give you the facts, then my questions. The actual index I'm using for one of my queries has the following characteristics : Multikey (contains 4 keys). The average key ...
0
votes
1answer
56 views

assistance with mongodb setup on windows server

I am currently setting up Mongo DB on a dedicated web server. I am not experienced with Mongo so I have some questions around its setup. I have done research in to Mongo etc but would like some ...
3
votes
1answer
913 views

Limit memory used for mongoDb

Is there any way to limit using RAM for mongodb on Debian? I'm looking for a solution fo about 8 hours, but have no results.
2
votes
2answers
286 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
175 views

Which database to use? [closed]

Hey there. I am looking for a free to use for commercial website database that should have these design features, in the given order: Auto-Sharding (getting more free space by adding more server ...
0
votes
1answer
46 views

How to save mongodb data sub data more properly in this case?

I have a business collection. The businesses are reviewed by users. Each user can only review a business once. Future reviews will simply replace the former one. This is how we store it: ...
6
votes
1answer
1k views

MongoDB Not Using All Available RAM

I have something around 200 GB worth data stored in a mongo cluster. The physical memory on one of the instances which runs mongo is 8GB. Nothing else of any consequence runs on this instance. As near ...
1
vote
2answers
296 views

Mongodb multikey index and $all in queries

I have such structure of documents in my products collection: { title: 'Samsung Galaxy S III', category_id: ObjectId("50bcc2f0b910a6c1936a4424"), properties: [ { title: 'OS', ...
1
vote
1answer
60 views

Sharded Mongodb Communication

I would like to know what ports I need have open for a sharded mongodb cluster. For example does the mongos need to be able to accapt connections to and from mongoc. I dont want to have to many open ...
3
votes
1answer
2k views

MongoDB: What does '[DataFileSync] flushing mmaps took … ms for … files' mean?

I am building an index in MongoDB for a large collections (~300GB) and the db terminal window keeps printing: [DataFileSync] flushing mmaps took 10920ms for 151 files The time that it takes to ...
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 - ...
0
votes
1answer
546 views

RegEx bug in MongoDB

I run the following queries on a collection that have a lot of entries that contain [ and ]. db.test.find({word:/[\[]/}); // could not be run in console db.test.find({word:/\[/ }); ...
1
vote
1answer
923 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 ...
2
votes
2answers
254 views

Sharded MongoDB backup solution

I am looking for a way that I can backup my 12 MongoDB shards into a single server. Disk space is not an issue but getting the backups to be on a single node would be the best. I am not sure if there ...
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 ...