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
2k views

Creating mongo 3 node replica set on ec2 problems

I'm trying to create a 3 node cluster of mongo replicas on ec2 instances, with internal ips 10.168.xxx.xxx, 10.166.xxx.xxx and 10.188.xxx.xxx, my config file is: dbpath = /home/ubuntu/mongo-data/ ...
0
votes
1answer
539 views

mongodb user for ubuntu EC2 instance

I am trying to install mongodb on Ubuntu EC2 instance. However, I am confused about what user the DB would run as: If I follow: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ ...
2
votes
1answer
57 views

How to handle “or” possibilities in MongoDB

I'm new to MongoDB and by no means an expert in DB design in general. This feels like a really basic question that's probably been answered a million times, but I'm having a surprisingly hard time ...
1
vote
1answer
317 views

Mongo repair database “ERROR: error: exception cloning object in local.system.replset ”

I'm trying to repair a mongo database and am running into the following error early on: Wed Jul 24 16:55:21 [initandlisten] ERROR: error: exception cloning object in local.system.replset E11000 ...
0
votes
0answers
69 views

MongoDB RAM requirements doubt

I have a data file with 100 million documents. The number of documents is expected to always remain between 100 million and 200 million for atleast a year. I have 15 GB Ram. Currently the update ...
1
vote
0answers
205 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
1answer
37 views

Check and remove iteratively without an index

Without sync priority or performance requirements on the task, I need to check all documents once per day and removing some of them. The find filter is not static but can be defined within a db ...
0
votes
1answer
216 views

Preventing mongodb crashes

I am using mongodb with the web server. Recently, I observed that mongodb server crashed after "no space left" for journalling. So, after some online help I could repair and restart the DB. But, ...
2
votes
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 ...
3
votes
1answer
658 views

mongostat causing CPU 100%

On a 64Bit Debian 6 OS with 4 CPU cores and 8GB RAM, I can reproduce an issue with mongostat. Whenever I create an index, reIndex or even index in background, according to top, the CPU load is 40-60% ...
1
vote
0answers
102 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 ...
8
votes
1answer
4k views

What happens if there are too many inserts in MongoDB? How to ensure all data is stored?

I use MongoDB to store periodically measured values. Every ~100 ms a bunch of values is inserted as document. It works fine, but I'm worried about performance issues. (I use safe inserts, it seems as ...
0
votes
0answers
88 views

Locking and Faulting on import

My collection with a _id and a single field index is run on a single node/on localhost, has 48GB RAM and 16 core CPU available. The hdd is in RAID1, without SSD cache. Mongo version 2.4. I run a ...
1
vote
1answer
307 views

optimizing MySQL for traffic analytics system

background : I've developed a URL shortener system like Bitly with same features , so the system also tracks clickers info and represent as graphs to the person who has shorten the link as ...
3
votes
2answers
182 views

Scalability: Desiging a message table

This question might be deadly simple but I wanted to make sure I am going through the correct path and not making any simple and irrevertible mistakes. My project will be based on messaging and it ...
-2
votes
1answer
85 views

mongos and monod have the same default port?

Is it true that by default mongos and monod uses the same port 27017? I had to pick a different port for one of these two. For example --port 37017 for mongos. Did anyone have the same confusion? ...
4
votes
1answer
306 views

Should I deploy Mongodb sharding for 50 collections?

I have a 10 node clusters that runs about 50 concurrent jobs. Each job needs to read/write a separate collection. So I have about 50 collections roughly. Each collection has about 20 M records. Most ...
2
votes
1answer
689 views

Mongo authentication user can't drop database

my question is - is it possible to define user in the Mongo database who will be able to drop the database? Maximum user privilege is "dbAdmin" but that privilege doesn't allow users to drop the ...
1
vote
1answer
151 views

MongoDB service not starting on RedHat - missing 'service_uri'

I'm on a Red Hat Enterprise Linux Client release 5.4 (Tikanga) machine I created my /etc/yum.repos.d/10gen.repo like this: [10gen] name=10gen Repository ...
1
vote
1answer
312 views

monitoring mongodb and mysql replications using nagios

I have set replication for mongoDB and mySQL. Now I have to manage them using nagios. I have to write some php-script that will read server status. I am good with nagios setup. Now I want to know ...
0
votes
1answer
332 views

How to find mongo document by ObjectID age

I have a collection of documents I'd like to pull a subset created after a certain point in time. I understand the timestamp of creation is encoded in each documents ObjectID (assuming they are auto ...
1
vote
1answer
824 views

mongodb replication node stuck at “STARTUP2” with optimeDate as 1970

i have just setup replica sets with three nodes . the third node is stuck at stateStr STARTUP2 with "optimeDate" : ISODate("1970-01-01T00:00:00Z"). However its showing no error message. Is this ...
0
votes
1answer
550 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
180 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
240 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
548 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
110 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
308 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
53 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
50 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
937 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
491 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
132 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
266 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
800 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
810 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
811 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
543 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
554 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
7k 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
4k 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
372 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
268 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
332 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
245 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 ...