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
239 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
0answers
10 views

How to read a bson file using C#

I have a bson file dumped by mongodump command. How can I read the content of this file to memory with C#?? I don't want to use the mongorestore command.
3
votes
1answer
5 views

How to remove a corrupted shard in MongoDB

I use MongoDB 3.0.3 with Wired Tiger engine on Cent OS 6.4. I have a sharded cluster of 4 shards each of which has about a quarter of total data. One of the shard called "shard2" corrupted and ...
1
vote
1answer
24 views

Ring topology support of MongoDB ReplicaSet and Sharding?

Just curious if the following ring-like topology supported/recommended or is right for a sharded/replicaset cluster. version: mongodb 2.4.5 hosts(all vms) #[MongoDB Config] mongodb_roles="replset1 ...
1
vote
1answer
119 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
0answers
13 views

MongoDB C# driver fails to reconnect after stepDown

I have an Elastic Beanstalk environment in AWS that constantly verifies the DB is accessible by querying the mongos for one document. We only speak to the DB routers and not to specific instances. ...
0
votes
1answer
340 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
18 views

What data structure is used for MongoDB 3.x geospatial indexes?

For the MongoDB 3.x geospatial features what structure is used for the indexes? B-tree? R-tree? X-tree? I can't find any information about the structures in their documentation
0
votes
1answer
25 views

how to make secondary slave as readable in MongoDB?

How do I make a secondary slave as readable in MongoDB? We can do this via shell command rs.slaveOk() But how we can do it permanently for all session via config file?
0
votes
1answer
408 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
219 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
3answers
337 views

Database structure for hierarchical quiz?

I'm doing a personal project where I have a quiz with a number of boolean questions. Each question will have a two answer choices "true" and "false". Based on the selected answer, a new question will ...
2
votes
1answer
169 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
votes
0answers
16 views

Not getting exact output using User defined data types in cassandra [on hold]

In CASSANDRA, I created a User defined data type, cqlsh:test> create type fullname ( firstname text, lastname text ); And i created a table with that data type and inserted into the table like ...
3
votes
1answer
56 views

Who can explain mongodb with ssl?

I created certificates according to the instructions on the official website of MongoDB, but it doesn't work properly. I have a replica set and self-signed certificates. I need a full encryption ...
0
votes
1answer
108 views

Is there any way to change the size of preallocate data file in mongodb?

In mongodb data files are preallocates to a particular size,like first data file .0, the next .1, etc. The first file mongod allocates is 64 megabytes, the next 128 megabytes, and so on, up to 2 ...
0
votes
1answer
12 views

Unable to create replica set for MongoDB in Linux

When I run the following command: rs.initiate(), I get the following error: "info2" : "no configuration explicitly specified -- making one", "me" : "ip-10-0-2-113:27017", "ok" : 0, ...
0
votes
2answers
107 views

MongoDB data directory space is increasing

I have a worry, mongoDB data directory space is increasing very rapidly: I have a two data files and each one has reached 2GB limit and starts spawning 2 GB file multiple files. Is there any where I ...
0
votes
1answer
228 views

Mongo db sharded “the collection's metadata lock is taken” issue coming very frequently

I am seeing this warning in mongoS log consistently for one collection. [conn96] warning: splitChunk failed - cmd: { splitChunk: "ibeat20150105.dgrpCount", keyPattern: { articleId: 1, host: 1 }, min: ...
3
votes
2answers
146 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
1answer
34 views

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

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 ...
2
votes
0answers
22 views

Why is our Non-Mapped Virtual memory usage high when running MongoDB (MMAP) on CENTOS

Our non-virtual virtual memory usage on our Linux MongoDb instances seems high, currently sitting just over 2GB. The instances are running a minimal installation of CENTOS (no GUI) and they acting as ...
0
votes
1answer
384 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: { ...
1
vote
1answer
231 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 ...
2
votes
1answer
203 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 ...
2
votes
2answers
224 views

Mongos version 3.0.1 Split Chunk Error with Sharding

I have 3 config server and two shards. Each shard has a primary, secondary and an arbiter. This is running with the following mongod settings: storageEngine=wiredTiger ...
1
vote
2answers
450 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
3k 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
421 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
129 views

Limit the RAM memory usage in MongoDB

I am using MongoDB-2.6.1. Is there any way to limit the RAM memory usage? For example: Out of 4 GB RAM, let MongoDB use till 3 GB (<= 3 GB).
3
votes
3answers
345 views

'mongod wiredTiger' on Ubuntu?

I cannot use wiredTiger as a service for MongoDB. Then, I progresses step by step according to the following guide; http://docs.mongodb.org/manual/release-notes/3.0-upgrade/ Step-1: Start 3.0 ...
1
vote
1answer
132 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 ...
0
votes
1answer
16 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
813 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. ...
0
votes
0answers
20 views

Real time reporting on Mongo

I have my transactional data store as MongoDB cluster on which I need to setup real time reporting(may be a lag of 2 hours will suffice) Data size - 300GB with 20,000,000 rows and 40 columns and ...
2
votes
1answer
65 views

Mongodb high lock percentage / slow queries

I'm working with an application using MongoDB that is getting a fairly large number of incoming requests and I've noticed that the responses are getting slower as the number of requests get higher. ...
-1
votes
1answer
34 views

Mysql InnoDB vs Mongodb write performance

I need to increment a counter each time a web page is rendered. When I use mongodb to do that, I can do about 16000 writes per second on a 4 cores/8 threads CPU on a regular disk. When I use Mysql ...
0
votes
1answer
10 views

On EC2 Why do I need individual EBS volumes for journal, log, and data?

According to this MongoDB tutorial which explains how to manually deploy MongoDB on EC2, one of the steps states that you should have: "Individual PIOPS EBS volumes for data (1000 IOPS), journal (250 ...
0
votes
1answer
65 views

Does the MongoDB background flush (MMAP) update the entire document even if only a small portion has changed? i.e. set on an array position

We are currently trying to get to the bottom of some high background flush times on our MongoDB installation. As part of this investigation we have been looking at the $set operation we perform on an ...
1
vote
1answer
296 views

MongoDB text index and text search

I have a mongodb collection db.articles,it has 2 keys ,"title" and "abstract".I want to do text search on these two keys.For example, the search text is "physics",and I want all the documents whose ...
0
votes
0answers
14 views

Data dump from Mongo to CSV [on hold]

My requirement is that I need to dump all my latest data from Hidden replica on Mongo everyday to simulate real time data extraction. Options I have is mongoexport. Out of Screen and Nohup, which ...
1
vote
1answer
49 views

mongoexport on 2.0.4

What I'm I missing here? I need data greater that ISODate("2015-01-11T00:39:40.121Z") I know many forums have different answers for the same issue. But non resolved. Need a different point of view ...
2
votes
1answer
1k 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
52 views

updating single row in MYSQL

We have a situation where we need to update on a single row several thousands time a second and this requirement lasts continuously for 5 hours every day due to the nature of the business. Design ...
3
votes
1answer
118 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
1k 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 ...
1
vote
1answer
195 views

MongoDB installation Ubuntu 12.04 LTS errors

I need some help with my MongoDB installation on a clean, fresh Ubuntu 12.04 LTS server with no nonsense installed. I thought it would be a piece of cake, but I got some errors and the Ubuntu-forums ...
0
votes
1answer
140 views

Why do I have to run mongod as root?

When I run "/usr/bin/mongod --config /var/data/rs1/rs1db0v3.conf". It failes. The error is: warning: bind_ip of 0.0.0.0 is unnecessary; listens on all ips by default about to fork child process, ...
0
votes
1answer
206 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
140 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 ...