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
0answers
2 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
12 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
10 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
1answer
20 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?
2
votes
1answer
617 views

verify that mongos server is connected to config servers

I've been writing a backup script for sharded replica-sets and it's almost done, except that I can't seem to get it to successfully start the balancer back up after everything's all said and done. ...
0
votes
1answer
75 views

mongodb on-premise: will it work?

We are planning to package MongoDB-PostgreSQL hybrid solution in our application that will be deployed on customer site on-premise. It will be packaged as a software virtual appliance. Our reason for ...
0
votes
0answers
10 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 ...
1
vote
1answer
38 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
1answer
2k views

MongoVUE connect to mongodb with authencation failed!

I had a mongodb ,and a database named genbank ,genbank has a user whose role is "read" and "readAnyDatabase",it is very strange that I cannot connect genbank through this role by MongoVUE ,but I can ...
0
votes
1answer
31 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.
1
vote
1answer
92 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 ...
0
votes
0answers
14 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 ...
0
votes
1answer
287 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 ...
1
vote
1answer
323 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 ...
1
vote
1answer
562 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
1answer
72 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 ...
1
vote
1answer
81 views

Selecting, filtering and aggregating in MongoDB

if we have two dataset 1-First dataset contains population data of cities in the United States of America. Each record in the dataset has the following format: { "city": "ACMAR", "loc": [ ...
1
vote
2answers
19 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
28 views

Repair database on Replica in sharded set up

I am using mongo sharding in my DB. The scenario I am facing is that I have deleted some of my collections in my DB. But as to reclaim the space I need to run repair option which i can not run using ...
0
votes
2answers
195 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
13 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
23 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
15 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 ...
0
votes
1answer
659 views

Storing multidimensional array in MongoDB

I am attempting to convert a large MySQL database of product information (dimensions, specifications, etc) to MongoDB for flexibility and to move away from the restriction of a column based table. I ...
0
votes
1answer
26 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: { ...
0
votes
1answer
25 views

MongoDB - can read cause write locks?

I have a MongoDB database with ~100GB data size. I ran a test with 300 threads and a total 10,000 'read' queries. I notice on the MMS lock% it is showing 0.6 ~ 1% of write lock. My question is, the ...
0
votes
1answer
31 views

MongoDB - how to reduce numYields

I have a MongoDB database with ~100GB data size. I ran a test with 300 threads and queries are all reads, no writes (except writes to db profiler I guess). I enabled database profiler to keep track of ...
0
votes
1answer
17 views

MongoDB Manual References vs DBREF

I've been researching MongoDB and trying to see if it would be a fit for my company's product catalog. I came across database references: http://docs.mongodb.org/manual/reference/database-references/ ...
0
votes
1answer
32 views

Does remove document automatically remove the index that reference this document?

I am wondering if removing the document will automatically update the index if this document is referenced?
0
votes
0answers
16 views

Mongodb parent reference tree get current location and full path

I'm making parental reference tree with MongoDB and Mongoose. My schema looks like this var NodesSchema = new Schema({ _id: { type: ShortId, len: 7 }, name: { // name of ...
0
votes
2answers
29 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 ...
2
votes
1answer
23 views

Do MongoDB's “read uncommit” and “write lock” conflict with each other?

I was reading the MongoDB documentation, where it says about read uncommit: MongoDB allows clients to read documents inserted or modified before it commits these modifications to disk, regardless of ...
0
votes
2answers
440 views

Write a query which add two fields of a document and compare their sum to third field in mongo

I have one document say db.pageTrendLog.findOne(); { "_id" : ObjectId("538b7128cf16e3ea5a1ab23c"), "pgDownloadTime" : NumberLong(9776), "pgAccessTime" : ...
2
votes
1answer
247 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
2answers
45 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
1answer
609 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/ ...
1
vote
1answer
94 views

Sample YAML Configuration Files for MongoDB?

The MongoDB configuration options documentation lists all the available options that can be specified, but does anyone have a set of fully formed example YAML formatted config files for MongoDB ...
0
votes
1answer
29 views

MongoDB Replica Set Can't be connected To

I just set up a replica set for a standalone Mongo instance using the following changes to my config and rs.initiate(). # in master/slave replicated mongo databases, specify here whether # this is a ...
1
vote
1answer
179 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 ...
0
votes
0answers
43 views

MongoDB to store vehicle tracking information

I am building an app similar to Uber for tracking vehicles. Since the update frequency is so high (accounting for several users), I want to know the general practices involved for making writes faster ...
1
vote
1answer
78 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
1answer
18 views

Data distribution in mongos with shards or replica sets

I am a newbie to mongodb.I have set an mongodb architecture with a single mongo shard(mongos) connected to three shards(replica sets) with three config servers. The architecture looks as below: Now ...
0
votes
1answer
15 views

Standalone MongoDB to MongoDB Shard Setup

I'm learning MongoDB currently so maybe the title of this question is worded poorly, but I'm looking to understand the scaling of Mongo better. I did some research on what DB would be best for my ...
0
votes
1answer
707 views

mongodb 2.6 mongos start up failed

I'm trying to run mongodb 2.6, everything followed my 2.4 version setup steps. but when I start mongos I got the following problems and just cannot make it. 2014-04-24T03:38:31.001+0800 [mongosMain] ...
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 ...
0
votes
0answers
9 views

Proper tree NoSQL structure with focus on full-text searching

I developing an app with tree(folder-file) structure, on which I should perform full-text searches with MongoDB. I did a research on the best tree structure practices and found this great article, but ...
0
votes
0answers
17 views

Mongodb sharding balancing not working properly, says config servers differ [duplicate]

Iam using a mongodb sharding configuration in which there are 3 config servers, 2 query routers and 2 shards. One of my shard is having 32 gb data and other is having only 6 gb data. Balancing is not ...
1
vote
1answer
181 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
1answer
29 views

Migration of chunks not taking place in sharding

I am trying sharding in MongoDB. I am working with 1 config server 1 Query router 2 shards I tried hash based sharding. The data is getting partitioned but sharding is not successful. In one ...
0
votes
1answer
27 views

Can I copy a collection in mongoDB from one database to another by copying the db files directly?

I tried using cloneCollection http://docs.mongodb.org/manual/reference/command/cloneCollection/ , but clonecollection takes a lot of time in case of big collection because it starts indexing the data. ...