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

1
vote
1answer
94 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

Nosql multiple database design to handle sharing scenarios

This question is regarding design of a database in mongodb. The scenario: A user has a drive which he can share with others. Drive has two categories: docs and others. The user has three choices in ...
2
votes
1answer
16 views

mongoexport not exporting all possible data

I have a collection with documents similar to the following: { _id: 'p_123456', id: 123456, kind: 'person' data: [...] } id field can contain either positive or negative integers. This ...
1
vote
0answers
9 views

Help - Error : Could not connect to master of shard replica set

I have a shard, using mongo v2.4.11. It has to mongos, 3 config, and 8 replica set (2 replica for each set, means 16 node for shard) It is keep having exception as per below. Caused by: ...
1
vote
1answer
8 views

How to use fsyncLock() safely in backing up a single mongod

I read from mongodb document: important: db.fsyncLock() may block reads, including those necessary to verify authentication warning: When calling db.fsyncLock(), ensure that the connection is kept ...
0
votes
1answer
314 views

exception: hosts cannot switch between localhost and hostname

I created a replication set. I added localhost in the set in the beginning, but when I try to edit the member with the actual hostname. I get error "exception: hosts cannot switch between localhost ...
2
votes
1answer
257 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
18 views

MongoDB Sharding : What should be the Sharding key if we want to find records with more than one field

I am having collection ("links") with listed fields: collection-name: "links" 1) url 2) title 3) score 4) description 5) ratings (embedded_many) and having index on "url", "title", "score" because ...
0
votes
1answer
25 views

I can not copy database MongoDB

I created a mongo cluster in ubuntu and run the copy in the sharding with a small database, everything works fine. The problem is that when I try to copy a database 300gb, is not getting done. The ...
1
vote
1answer
617 views

“ERROR: could not read from config file” MongoDB

I'm trying to configure MongoDB in OS X Mountain Lion. I've installed with Homebrew; I have followed lots of tutorials, but I have got an issue which I haven't been able to solved. The issue is about ...
0
votes
0answers
18 views

An efficient way to do “reverse queries” in MongoDB for an expert system?

I am working on an "expert system" in which I would like to perform "reverse queries", that is I want to store queries and find queries that match a given object. For example, if I have an object ...
0
votes
1answer
81 views

MongoDB - sharding

I have a sharded cluster with 4 shards, 3 config databases. My problem is when I do my inserts only one shard gets filled. Can anyone please explain to me why this is happening. My first thought was ...
0
votes
1answer
78 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
1answer
8 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
1answer
14 views

Mongodb: Does not seem to respect capped size limit

Running mongodb on win2012 Mongo db version v2.6.4 Our collection is created with this param: capped:true, size:500000000000 // 500 gb But the data dir, that only holds this one collection, has ...
0
votes
1answer
18 views

Update an array element with inc mongo update

HI All I have this Data in mongo, {"articleId" : [ { "articleId" : "9514666", "articleCount" : 1 } ], "count" : NumberLong(1), ...
0
votes
1answer
14 views

Mongodb: Does the stats command show me the capped size setting?

I am looking around my mongo instance. One of the collections was created as capped: db.createCollection("userObjects", { capped:true, size:400000000000 }) But when I look at the ...
0
votes
2answers
220 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 ...
0
votes
1answer
67 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
72 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
1answer
24 views

I cannot do anything on replSet when auth is enabled

I have a mongodb cluster with one replSet, 3 config servers, and 2 mongos instances. I logged into mongos using (admin, pwd). admin is given ["userAdminAnyDatabase", "dbAdminAnyDatabase", ...
0
votes
1answer
260 views

Huge size on mongodb's gridfs. Should I compact?

I’m running MongoDB and grid.fs to store small files (less than 20mbs). These are part of a replica set. I currently have more than 350000 files stored. I’ve noticed that the chunks collection takes ...
0
votes
0answers
3 views

can we avoid the database disk size increases as a multiple of the CSV file in mongoimport?

I am importing data from csv files of size more than 1GB (and have 15 files) using mongoimport. After importing near 20GB data it goes out of space on my system which has 250GB hard disk. I go through ...
0
votes
0answers
15 views

can we avoid the database disk size increases as a multiple of the CSV file in mongoimport?

I am using mongodb-linux-x86_64-2.6.6 and importing data from csv files of size more than 1GB (and have 15 files) using mongoimport. After importing near 20GB data it goes out of space on my system ...
1
vote
1answer
186 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
0answers
32 views

MongoDb Volume alert so much iops(>10000)

I am new for MongoDB. I have setup mongodb for my production server. I have setup alert in aws ec2 instance for iops and it gives me alert every 15 minutes that iops reached at > 10000. I am not ...
0
votes
1answer
19 views

How to know what server and port to select in MongoVue

I am unsure about which server and port to select when trying to start up MongoVue. FYI, MongoVue is the windows GUI for using mongodb (for those macusers who may want to answer this question). I have ...
1
vote
1answer
34 views

MongoDB Stuck with Jumbo chunks while exhausting a shard

I'm running a shared MongoDB 2.4 cluster. I'm currently in a process of exhausting a shard and I'm down to the last 15 chunks needs to be migrated out of 9660. My issue is that these chunks are too ...
1
vote
1answer
83 views

Start mongod instance on replica set as background job

I have setup a Mongodb replica set with 1 secondary node. When i execute on secondary sudo mongod --replSet rs0 --dbpath /data --port 27017 --oplogSize 700 The primary and secondary nodes are ...
0
votes
0answers
24 views

Can i run both Redis and MongoDB l on same VPS?

My website about learning new vocabulary, and the operations which most use on website is load a new vocabulary in database, then write some parameter to that words. So i decided my database need ...
1
vote
1answer
24 views

Limit the RAM memory usage in MongoDB

I am using MongoDB-2.6.1. The question from me is that- "Is there any way to limit the RAM memory usage??" Fr example: Out of 4 GB RAM, let MongoDB use till 3 GB (<= 3 GB). Please help me out.. ...
1
vote
1answer
25 views

Mongodb: too many namespaces raise on setProfiling

I have a mongodb database with a single (relatively big, around 130GB) collection, with 3 indexes, on which I'd like to do some profiling. However when I run the db.setProfilinStatus(1, 1000) command, ...
3
votes
1answer
55 views

3 Node Replica Set all became SECONDARY

my 3 set replica set all became secondary and I'm not sure why. db1 2014-12-12T02:43:55.067+0000 [conn1413096] end connection 10.0.64.12:58483 (512 connections now open) 2014-12-12T02:43:55.067+0000 ...
2
votes
1answer
23 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
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
1answer
235 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 ...
0
votes
1answer
68 views

Mongo DB Backup & restore

0 down vote favorite I have a DB with 150GB of data. I am using the MongoDump and Mongorestore methods to backup and restore. My production server is running Mongo 2.2 and my test server is 2.6.1 ...
0
votes
0answers
11 views

aggregate array records in mongo db

HI All I have this Data in mongo, {"articleId" : [ { "articleId" : "9514666", "articleCount" : 1 } ], "count" : NumberLong(1), ...
0
votes
1answer
325 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
0answers
11 views

MongoDB mongoexport $or query returns zero records

I have the following cmd in bash termial mongoexport --db fscrap --collection Wall -q "{\$or : [{'insert_time' : {\$gte : new Date(1393624800000)} },{'comments.comment_time' : {\$gte : new ...
0
votes
1answer
36 views

Choosing shard key with compound index field

I have a compound key with field articleId_1_host_1_timeStamp_1_isIndia_1_location_1. Cardinality of fields is articleId has 20000 different value host has 17 value timestamp is increasing field ...
0
votes
1answer
30 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
1answer
69 views

users and roles in mongodb

Following users are created in mongodb. First user created with name "user" having read write role for "project" database use project db.createUser( { user: "user", pwd: "user123", ...
0
votes
1answer
22 views

Mongos - Query error

After we configured six replica set servers and three config servers with mongos. we are not able to see records from mongos server. Kindly have a look my below errors and please suggest to us. ...
0
votes
1answer
12 views

Disable TTL thread in MongoDB

Is there any way to disable TTL deletion thread in mongoDB? I know that you can modify the ttl index expireAfterSeconds value to a high number in order to "technically" stop ttl from deleting, but i ...
0
votes
1answer
14 views

Copy Remote Database MongoDB

First off let me say I am a newB when it comes to Mongo, so excuse my ignorance. With that being said: Using db.copyDatabase() to copy a remote database: What impact does this have on the database ...
1
vote
1answer
427 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
1answer
86 views

Use index intersection feature in mongo 2.6 to compound shard key

I am having three indexes like name,age,salary. I can use them as compound index as per 2.6 (name and age together). But can i use the same indexes as compound shard key like name and age. i also have ...
0
votes
0answers
22 views

Pentaho Kettle (Data Intergration) MongoDB Aggregation

I'm using kettle v5.2 which support the aggregation pipleline in MongoDB when using MongoDB input the query works for small data set but I need to use option allowDiskUse to the query can't figure ...
1
vote
1answer
66 views

MongoDB index strategy

I'm developing a system to back-up computers and store the files / data with retention for a while. The actual files are stored in an object store, while I'm planning to keep the metadata of the files ...