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
206 views

MongoDB - Insertion Speed

Suppose you have a collection of students of the following form: {"_id" : ObjectId("50c598f582094fb5f92efb96"), "first_name" : "John", "last_name" : "Doe", "date_of_admission" : ...
0
votes
0answers
7 views

Mongo range query became extremely slow on large collection

I have a collection which has 50 million records in it. After using wired Tiger its size became only 3 GB (2 GB data 700 MB index). I have created index on this collection. But when i do a range query ...
0
votes
1answer
84 views

Data Migration or Sharded Cluster to new Cluster

We have Sharded Mongo Cluster. However some documents are sharded and others are unsharded. We are planning to migrate these databases to new cluster. Please update if there is any process or steps ...
0
votes
1answer
26 views

Mongo Db server status with wired Tiger

I was testing my DB with Mongo 3.0 wiredTiger setup. After restoring my database with wiredTIger i ran db.serverStatus. I found following in console output. "bytes currently in the cache" : ...
2
votes
1answer
102 views

Mongodb replica sets: why does my master server occupy more disk space than my slave?

I have two servers on my replica set. Let's call it the master and the slave, for the purpose of this discussion. The master was the original one, and the slave was replicated from that master. At ...
1
vote
0answers
8 views

Mongo 3 Intermitted Craches

Currently running two VMs with fresh installs of Ubuntu 14.04 x64 and Mongo 3 Stable. Our processing VM is doing great under heavy loads, however our production VM seems to have Mongo crashing once ...
0
votes
1answer
108 views

Improve the insertion rate of mongo sharded cluster

I can't disable the write concern while i mongorestore with .bson file. It totally damages the insertion rate (insert/sec). This is my sharding status. mongos> sh.status() --- Sharding Status --- ...
0
votes
1answer
6 views

Multiple databases through a single connection MongoDB, GridFS

I want to use GridFS in your project. As the main database using mongodb. My application can do only one connection to the database (such conditions). Can I make calls to other databases using the ...
1
vote
2answers
22 views

Does MongoDB support two 2-way synchronization

We are looking at moving our data from IBM Domino to another backend. One of the things Domino does really well is replicate (or synchronize as they call it) between a Server and Clients. That means ...
2
votes
1answer
276 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) ...
0
votes
1answer
101 views

MongoDB can't add new replica set member

I have a replica set, and I added a new member to the set. The initialSync begins for the new member and rs.status (on primary) shows STARTUP2 as status. However, after a long enough time, there's a ...
0
votes
1answer
88 views

$addToset do not work in update if record not exists

I am trying to use following query db.TestColl.update({ "tags" : "silk" , "host" : "host.com"},{ "$set" : { "cat" : "MOVIE","publishTime" : 1370427540000 }, "$addToSet" : { "articleId" : { "$each" : ...
0
votes
0answers
16 views

Failing to ensureIndex on sharded Mongo

I run a mongoDb, sharding it on 4 different shards (+ 1 router and + 1 config). Sometime ago I had to replace a shard, and everything went ok. But now, every time I run: db.summoners.ensureIndex( { ...
0
votes
1answer
333 views

Issue while restarting - mongdb

I had tried to start the mongodb service using the following command in linux machine. service mongod restart I am getting the following error Stopping mongod: ...
0
votes
0answers
28 views

Mongo DB accessesNotInMemory issue with RAM size

I am using Mongo Replica set and it seems to be working fine but when i check db.serverStatus i saw that there are lots of accessesNotInMemory for all The DBs in my mongo instance. I checked MY RAM ...
1
vote
1answer
429 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 ...
0
votes
1answer
112 views

MongoDB syncingTo change

I have a 3 members replica set version 2.6.1 with following configuration "_id" : 0, "host" : "10.125.16.22:30000", "priority" : 2 ...
0
votes
2answers
80 views

MongoDB: co-locate the mongos process on application servers

I would like to ask a question about a best practice described in this document: http://info.mongodb.com/rs/mongodb/images/MongoDB-Performance-Best-Practices.pdf Use multiple query routers. Use ...
0
votes
1answer
16 views

Mongo 3.0 release for Cent OS

Can any one tell me When Mongo team will release 3.0 production release. Also will it be available for cent OS as we are shifting g our production boxes from RHEL 6 to cent OS and on Mongo Download ...
0
votes
1answer
144 views

Long running query on replica worker set in mongo

Hi I updated my mongo version from 2.4.to 2.6. Now when i see current op in mongos it shows me some queries which are running for long long time. one example is { "opid" : ...
0
votes
0answers
14 views

How to create and select entities in MongoDB?

I'm a newbie in MongoDB and I'm trying to understand how to create objects there and how to select them in comparison with relational databases. So I need an example how to perform these things. ...
0
votes
1answer
191 views

Mongo DB Replica set Stuck at RECOVERING state

We have created a replica set and now the problem is 2 members of replica set [3 members set] are in recovering mode from 48 hours. Initially the size of recovering nodes was increasing and now even ...
0
votes
2answers
277 views

Mongodb ubuntu - config server and shard together

I have the following services on a single shard server: sudo mongod --dbpath /data/db/ --port 31001 sudo mongod --configsvr --dbpath /data/configdb/ --port 21001 The same server is using for shard ...
-1
votes
1answer
10 views

Mongodb developer ROLE [closed]

is there or will there be a market with job role as mongodb developer like oracle developer or sql server developer. pure database developer without any need to code in java or perl or python.. Or ...
0
votes
0answers
11 views

Error while doing in replicaset in windows (mongodb)

I tried doing the replicatset in windows, but im getting the below error. I checked the mongo process and killed the existing process. Even though the error exists. help me on this pls Thx ...
0
votes
0answers
15 views

How the statement based replication works internal on secondary node of mongodb?

Mongodb supports statement-based-replication. Would like to know, how the statement based replication converts the code internally on secondary node of mongodb. Is that working related to the ...
0
votes
1answer
356 views

Choosing shard key and friendly URL Ids for my MongoDB

I have decided to use MongoDB as my Database for a web application. However, I have some difficulties to get started and I hope that you can help me out with a few questions. I am developing my ...
0
votes
1answer
28 views

Sorting on compound Indexes

This may be a novice question but could it be possible query here. If I have a compound Index as { a: 1, b: 1, c: 1, d: 1 } Is this query possible? db.data.find( { a: {$gte:1,$lt:2}, b: { $gt: 3} ...
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 ...
1
vote
0answers
18 views

Mongodb schema design validation

I am building an app which allows users to do some "tasks" to earn points. The "tasks" are part of a "campaign" which themselves are a part of "brands". I am confused about the schema for storing the ...
1
vote
0answers
195 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: ...
0
votes
0answers
16 views

Can we resize a already capped collection in mongo db [duplicate]

I have a capped collection whose initial size i gave 3 GB. Can I modify its size again i mean reducing or increasing both way as per need? is there any command to do it. ...
0
votes
1answer
25 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
9 views

MongoDB sharding one collection on single server (2 drives)

I have one single server with two drives (SSD 256GB, HDD 1 TB). What I want to do is to store the newest documents in collection on SSD. Older documents can be stored in HDD drive. Is it possible in ...
0
votes
2answers
96 views

Unable to start Mongodb. Appears to be crashed, if yes, how to recover my data

Below is the error when ouput when I am trying to start my local mongodb. I am unable to start it and after little exploration, I doubt my local db has been crashed. If yes, is there a way to recover ...
1
vote
0answers
17 views

Good way to store daily train data in MongoDB

I am preparing to collect large amounts of information about trains in my country. Each train in my country has a number. I've already collected all of these numbers. There are about 4000 of them. ...
0
votes
0answers
21 views

MongoDB auto-failover: election doesn't happen

I have the following working replica set: { "_id" : "repl1", "version" : 6, "members" : [ { "_id" : 0, "host" : "hostA", ...
0
votes
1answer
157 views

How to update a field in sharded environment in mongodb using C# driver

I have successfully done loading in sharded environment. It is working fine. But when I do update in sharded environment, I am getting the error as : WriteConcern detected an error 'update { q: { ...
2
votes
1answer
126 views

Chunk Size is shown as 1 KB in mongo db logs even it is set to 300 MB

I am running a mongo cluster. Chunk size set is 300 MB but for today morning it is showing me in logs taht chunk size is 1024 Byte. I checked in current op there also it is showing chunks of 1024 ...
0
votes
0answers
10 views

Error running --eval mongodb command

I tried to run javascript (js) file to get shard's config server information, it runs fine in mongo shell but as result is too large to analyse on command prompt, i tried to save the output in a file ...
0
votes
1answer
204 views

Data Analysis with MongoDB or MySQL

I have a need for processing some data in order to come up with some statistic. This is the scenario: Each user can answer several questions from the question list. They pick their answers from a ...
0
votes
1answer
26 views

MongoDB Hashed Shard Keys Selection

I have a DB which holds very simple documents called "Item": {_id:<ObjectId>, playerId:int, isRead:bool, content:string} containing about 80M documents. Each Item belongs to a certain player, ...
0
votes
2answers
78 views

One of databases in MongoDB suddenly gets high lock %

I observe repeatable, sudden, short-time update queries slowdowns in MongoDB cluster for single database. That slowdowns lasts about 30 seconds and repeats few times a day. I found that lock % and ...
0
votes
0answers
23 views

MongoDB stops responding after 2 days of working

I've written small application in Python (I used Twisted). Program receives data and writes it to MongoDB. Every 2 days MongoDB stops responding: 2015-02-11T10:47:20.918+0100 [initandlisten] can't ...
2
votes
1answer
69 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
25 views

Extremely long startup time for MongoDB server

I have a MongoDB Server with just over 2 million documents in one collection. Individual documents can contain large amounts of data (some are several megabytes each) but none of that data is in ...
1
vote
1answer
292 views

How to setup a MongoDB replica set for the connector

I want to keep MongoDB and Solr in sync. The mongodb-connector (python) is the tool I want to use to do that. Now a replica set in mongodb is required (see ReadMe), but I don't want (and can) setup a ...
1
vote
1answer
549 views

Mongodb 2.6 Server crash and not restarting

We are using mongodb 2.6 with one Primary and 2 secondaries. One of the secondary has gone bad and not restarting. 2014-04-18T21:13:34.765+0000 [rsSync] replSet still syncing, not yet to minValid ...
0
votes
0answers
11 views

The MondoDB.org “Category Hierarchy” Example

I am creating an MVP app for a client but I am skilled in iOS mainly with only some DB experience. I'm using MongoDB. The schema is for a Product Catalog for small markets. The client wants a ...
0
votes
2answers
177 views

MongoDB/MySQL - auto increment vs object ID

I am in the process of evaluating MongoDB and writing some basic PHP applications around it. Typically in my PHP/MySQL applications, I would create an ID field and set it to auto-increment on each row ...