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
0answers
6 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 ...
1
vote
0answers
8 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 ...
2
votes
1answer
14 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 ...
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
24 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 ...
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 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
1answer
16 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
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
23 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
0answers
14 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
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
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
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 ...
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.. ...
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 ...
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 ...
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
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, ...
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
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
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
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 ...
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 ...
0
votes
1answer
15 views

MongoDB store weekly data?

I am trying to think of the best way to store my applications data in weekly chunks. The app is a basketball statistics app, after all the games are finished for example in week one I would like to ...
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
38 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
19 views

Replication lag is causing issue on one shard

I am running a mongo db sharded cluster with two shards. Each shard has one primary, one arbiter and one secondary. On one shard I am facing an issue with replication as it is showing this result ...
-1
votes
0answers
8 views

Error MongoDB - could not verify that config servers are in sync

Kindly let us know why we are getting the below error "config servers X.X.X.1:20001 and X.X.X.2:20002 differ" and "could not verify that config servers are in sync". Errors are below: ...
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
0answers
22 views

Mongodb compound index on two fields where one field is sparse

I have a collection of documents that give stats relating to videos. I have a unique compound index on videoId, date (there is at most one document per video per day). I want to be able to; in a ...
0
votes
0answers
20 views

mongodb configuration issue

I am editing the configuration of running mongodb in an 'amazon ubuntu instance' (with more than 30 GB data), and I attached some volumes for data, log, and journal I followed mongodb-ec2: ...
0
votes
1answer
14 views

Error on mongos server

Firstly,I am new to mongodb. when we executed the below command on mongos server. /usr/bin/mongos --configdb X.X.X.1:20001,X.X.X.2:20002,X.X.X.3:20003 --port 27017 --chunkSize 1 we are getting the ...
0
votes
1answer
17 views

Error when trying to add a shard set in Mongo db

I'm trying to add a shard set in mongos I got this error and . Kindly help. mongos>db.runCommand( { addshard : " firstset/ip_1:port_1,ip_2:port_2,ip_3:port_3" } ); { "ok" : 0, ...
0
votes
2answers
28 views

MongoDB replicaset number of connections too high

I'm using a 3 node replicaset with 2 data nodes(version 2.6.1 and 2.6.3) and 1 arbiter node. I get frequent alerts on number of connections >1000, whereas total databases are about 400 and also I'm ...
0
votes
2answers
17 views

Is there a way to replicate certain part of collection in Mongodb

Is there away to stream certain part of collection in MongoDB or TokuMX from master server to another server? I need to duplicate only certain collection Or if it isn't possible, are there any other ...
0
votes
1answer
32 views

MongoDB fails with SymInitialize error unless there is a very large Page File in Windows

I'm wondering if someone can help with a MongoDB/page-file issue we seem to experience as our database increases in size over time. Every now and then MongoDB will crash on a particular node in our ...
0
votes
1answer
64 views

How to create column group in WiredTiger engine in mongodb 2.8?

MongoDB 2.8 supports WiredTiger strorage engine, and WiredTiger supports column grouping. How we can create a collection in mongodb 2.8 with grouped columns?
0
votes
1answer
38 views

How Can I generate a data dictionary which contains the data types of a Json file.

The data dictionary should be generated from a CSV file of sample data.
0
votes
1answer
23 views

MongoDB all replica set members are “OTHER”?

I am setting up a MongoDB replica set using EC2's image: https://aws.amazon.com/marketplace/pp/B00CO7AVMY/ref=dtl_recsim_B007IBMJPI_B00CO7AVMY_3 MongoDB version 2.6.5 I have managed to set up ...
0
votes
0answers
36 views

debian sudo service mongod status shows failed but mongo is working

I started a replica set with three servers with default port and used a different data directory. But when i did sudo service mongod stop. it said failed. so i went into mongo shell and did a shutdown ...
1
vote
1answer
46 views

MongoDB Insert Performance

I have some data which are aggregated in chunks and later pushed into another collection. The problem is that aggregated data pushing to another collection is very slow and takes from few hours and i ...
1
vote
2answers
20 views

Query to Secondary on Sharded Cluster

How to specify query from mongos shell which is inteded to query data from secondary? The goal is not to bother primary load on write and use data in secondary shards instead.
0
votes
1answer
17 views

MongoDB Tag-Aware Sharding Workflow

I wonder the work flow of sharding cluster in Tag-Aware Sharding. --- Sharding Status --- sharding version: { "_id" : 1, "version" : 3, "minCompatibleVersion" : 3, "currentVersion" ...
0
votes
1answer
45 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
23 views

MongoDB - Change primary shard only for a certain database

I have a sharded MongoDB cluster running 3 different Databases. Currently all 3 databases has the same shard configured as their primary shard (shard000) Is it possible to change the primary shard for ...