All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.

learn more… | top users | synonyms

9
votes
1answer
9k views

mongodb config servers not in sync

I have setup with 2 shards, with 2 replica servers and 3 config servers, and 2 mongos. I have following problems: 1) mongo config servers out of sync: Aug 14 09:46:48 server mongos.27017[10143]: Sun ...
50
votes
5answers
16k 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 ...
4
votes
2answers
3k views

How to Determine Chunk Distribution (data and number of docs) in a Sharded MongoDB Cluster?

Having done all the right things - picked an appropriate shard key, scaled horizontally, distributed my data across several shards, I find I now have no real way to determine how well balanced the ...
12
votes
4answers
659 views

Good Resources on Operating/Administering MongoDB

What are the best resources for learning how to operate and administer MongoDB? There are plenty of resources on developing against it - which actually creates a problem when you've got plenty of ...
10
votes
2answers
5k views

check storage engine from shell

I'm upgrading to 3.0 and ran into some issues with the upgrade. Specifically, I got an error when trying to start up mongod via ssh, it tried to use the default dbpath instead of the one i specified ...
1
vote
1answer
518 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 ...
5
votes
2answers
605 views

Mongodb restrict access on collections level

I'm building a backend system using MongoDB. Now I want to restrict access on certain numbers of database collections to this system. For example I have users, admin_users, pageviews and I want this ...
3
votes
2answers
3k 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 ...
2
votes
1answer
1k 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
335 views

Mongodb: Possible to enlarge a capped collection?

If a collection is created as capped, is it possible to increase the cap without losing data? Or to increase the cap without recreating the whole collection? Thanks
0
votes
0answers
47 views

Get disk usage information of mongodb database

I have a database built in MongoDB and I need to obtain information related to the disk usage of the database through PHP. I have searched a lot but did not find relevant search results for retrieving ...
12
votes
3answers
13k views

Difference between Sharding And Replication on MongoDB

I am just confuse about the Sharding and Replication that how they works..According to Definition Replication: A replica set in MongoDB is a group of mongod processes that maintain the same data ...
17
votes
2answers
1k views

CouchDB vs MongoDB [closed]

Evaluating document-oriented storage, what are the pros and cons of CouchDB vs MongoDB?
5
votes
2answers
5k views

How to backup large MongoDB database

What is the recommended way to back up large data sets in MongoDB? Let's say we have a data size in the order of 10TB - how would you back that up? We're considering a hidden, possibly delayed, ...
3
votes
3answers
4k views

Why is Mongo stuck in STARTUP2?

I have a Mongo replica set with a few secondaries. A box, which hosts a secondary instance, crashed and lost the database. I started the secondary Mongo instance again and now it's stuck in STARTUP2 ...
2
votes
1answer
2k views

When upgrading config servers to use WireTiger, the running config server with wiredtiger does not authenticate the existing pass and user?

In order to upgrade mongodb to 3.0.0, I am upgrading my config servers to use WireTiger. I followed the subsection of Change Config Server to Use WiredTiger. There are 18 steps. I run mongodump --port ...
13
votes
5answers
2k views

Infrastructure for Highly Concurrent, High Write DB

My requirements are: 3000 Connections 70-85% Write vs Read Currently, we are maxing out a High-CPU, Extra Large Instance at 700 connections. All 8 cores are maxed. We think it's the number of ...
5
votes
3answers
2k views

Setting up Mongo with clustering

I'm going to start using Mongo as a database but I will not have it clustered at first. Can I use Mongo on a single machine, then later come back, cluster it and capitalize on the sharding? Or can I ...
3
votes
1answer
2k 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 ...
2
votes
1answer
1k views

How to add setParameter in mongod config?

When I am using setParameter in mongod config, I start mongod with error: Unrecognized option: setParameter = enableLocalhostAuthBypass=1 How can I use setParameter from config file ? P/S: I am ...
1
vote
1answer
183 views

How to update a whole document in MongoDB using PHP?

I want to update my older entries through the PHP interface in MongoDB. First, I get data from the text fields and then store that into variables. Then I use those variables to update data in Mongodb. ...
1
vote
1answer
62 views

Why does MongoDB extend FileSize if it is already 5x larger than DataSize

I recently had to assign more diskspace to my MongoDB 2.4.8 instance. This instance continually receives transactions, makes some updates and then deletes them after 3 months. I would therefore expect ...
8
votes
2answers
4k views

mongodb: replica-set with load balancer

Is there an option for load balancing with mongodb replica sets? I am not asking for a HAProxy or similar, but for a built-in feature from mongodb. Could not find tips for this in the docs.
6
votes
2answers
97 views

Force a Member to Become Primary in mongodb

I looked into answers but nothing works for me in mongo 2.6.11 cluster 'nms' (members nms01m and nms02) below. I want my current secondary nms01m to become primary, and now nms02 is primary instead of ...
4
votes
1answer
2k views

Can I disable journalling to improve performance

We have a 16 shard MongoDB 2.4 installation running in AWS that is eating money. The data is volatile, it only gets used within 15 minutes of creation If the cluster goes down we wipe it out and ...
3
votes
1answer
117 views

Mongodb incremental oplog Dump not working

I am not able to take an incremental oplog dump. I am not getting any error messages the connection happens fine and also there is a operation recorded(shows up in db.currentOp()), but still nothing ...
2
votes
3answers
43 views

MongoDB multi update consistency

I have a collection similar to the below, of say 5,000,000 records. { "_id" : ObjectId("56d18f95d2961d1ddcb7244f"), "rec_id" : 0, "status" : "open", "updated by" : "A" } User B is trying ...
2
votes
1answer
386 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
1answer
106 views

MongoDB allocates chunks only to Primary when sharding is enabled

I'm setting up an instance of MongoDB with 3 shards. I've setup everything seemingly correctly by following the docs and comparing my config with that of a friend who has a similar setup but with a ...
1
vote
1answer
223 views

mongo converting standalone to replica set causes services down

I have standalone node1 already running for a long time. Now I want to convert it to replica set. I followed steps in https://docs.mongodb.org/v2.4/tutorial/convert-standalone-to-replica-set/ to ...
1
vote
1answer
254 views

What's the procedure to set up username/password on mongodb?

I have tried setting up username / password .But none of the methods seems to work. 1. In mongod.conf ----> remove **#auth=true** to **auth =true** 2.Started the mongod server --> sudo ...
1
vote
0answers
123 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 ...
1
vote
1answer
131 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
2k views

Removing Database from sharded cluster in Mongo DB

I Have a mongo shard db system with two shards and and three mongos servers.My application creates DB on daily basis as per our business requirements. We have some sharded collection in each day DB. ...
1
vote
1answer
103 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
2k views

MONGODB primary became secondary after servers restart

I had this config before restart: { "_id" : "rs0", "version" : 5, "members" : [ { "_id" : 0, "host" : "Ubuntu12041vanilla:27017" }, { ...
1
vote
1answer
309 views

High Global Lock % on Mongodb

I've just started using Mongodb v2.4.8 and the global lock % averages 80% which seems rather high to me. The CPU usage is around 120% on a 2 core, 2GB RAM, SSD VPS running Ubuntu 12.04 64bit. iotop ...
0
votes
0answers
70 views

MongoDB too many db.eval cause my DB can't read write

I am using C# Web API with mongocsharpdriver 1.9.2 and MongoDB 2.6.9 In my case I need performance that have to use db.eval to execute JavaScript on the server side. But I got a problem that too ...
0
votes
2answers
389 views

MongoDB document delete and fragmentation

I've a MongoDB collection that works like a queue: new documents are insert and old documents (after 60days) are removed. I can see a rapid grown of the datafile size, too rapid. I can be reasonable ...
0
votes
1answer
220 views

MongoDB WiredTiger compression stats

I'm using MongoDB 3.0.4 with WiredTiger storage engine. I was looking at collection stats and I'm seeking explanation on compression stats fields. What does "page written failed to compress" indicate? ...
0
votes
1answer
90 views

Mongo is using 5-7% of CPU, so why is my computer so slow? [closed]

I've installed MongoDB (not sharded, single location) on an AWS EC2 instance, and I'm finding that when I'm running large insert operations via pymongo, my entire EC2 instance gets very sluggish. Yet ...
0
votes
1answer
167 views

Good ratio for data, journal, and log drive sizes for MongoDB?

Is there a good ratio for drive sizes for MongoDB? For example if you have a 8Gig drive for the data, then how big should my drive for the log be? How about the drive for the journal? Just a little ...
0
votes
1answer
76 views

How to force a delayed member to become primary in case of failure in mongodb

I have three member set [primary,secondary & arbiter] in my data center 1 [DC1]. Now i want a delayed member in data center 2 [DR]. In case DC 1 is completely down then my sub net application ...
0
votes
2answers
200 views

In mongodb, is “sh.getBalancerState() is false” the same as “sh.isBanlancerRunning is false”?

During upgrading config servers to use WiredTIger, I stopped balancer using sh.setBalancerState(false), and then I run sh.getBalancerState(). The output is false. Does this mean the balancer is not ...
0
votes
2answers
894 views

Is that possible to backup MongoDB sharded cluster without LVM or mongodump?

There is a "LVM-solution" in MongoDB documentation: http://docs.mongodb.org/manual/tutorial/backup-sharded-cluster-with-filesystem-snapshots/ Can I do the same thing, but without using LVM snapshots, ...