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

Mongodb find() operation sometimes extremely slow

I have a collection in mongodb (latest 3.0.4, not wiredtiger) with about 8 million documents. For the most part it's very fast but sometimes all reads to the database start stacking up and the culprit ...
0
votes
0answers
37 views

Adding wiredtiger nodes to a non-wiredtiger replica set

Situation I have 3 nodes on a Replica Set (P+S+S). Mongodb version 2.6.9. I would like to migrate all the nodes to 3.0.4 wiredtiger. When I need to do that without downtime, I do the following ...
0
votes
0answers
13 views

MongoDB fsyncUnlock won't unlock occasionally on Windows

We have a MongoDB replica set installed on Windows servers, with a scheduled backup job. MongoDB is configured to use journaling. The job runs db.fsyncLock() via script on MongoDB (primary server), ...
0
votes
0answers
11 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.
1
vote
1answer
30 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 ...
3
votes
1answer
7 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 ...
0
votes
1answer
28 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
15 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
1answer
39 views

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

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
25 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
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
0answers
21 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 ...
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 ...
-1
votes
1answer
49 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 ...
-1
votes
0answers
16 views

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

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 ...
1
vote
0answers
15 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. ...
2
votes
1answer
71 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. ...
0
votes
0answers
16 views

Data dump from Mongo to CSV [closed]

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 ...
0
votes
1answer
66 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 ...
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 ...
0
votes
1answer
19 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
1
vote
1answer
26 views

How to index an property object in MongoDb?

i've the following sample document: { "_id" : ObjectId("556e177ca43da29e040041a7"), "user_id" : NumberLong(24), "request_datetime" : ISODate("2015-06-02T15:52:12.000-05:00"), ...
0
votes
1answer
28 views

mongodump with readpref nearest

I have a mongodb cluster where shards exist across multi geographically locations and each of those locations have replica members for each shard. I have setup our DR datacenter. Which also has a ...
0
votes
0answers
17 views

What is the sequence to enable the authentication in mongodb cluster without stopping the service

Assume that the cluster is running with authentication disabled. There are one mongos instance, 3 config servers, and two replication sets. each replication set has 3 mongod instances. My order is ...
-1
votes
1answer
52 views

MongoDB denying API access, while console shell works

I am a MongoDB newbie, with a MongoDB instance running on a Ubuntu machine. If I login onto the machine's console and run mongo -u username -p password databasename I have permissions for the ...
0
votes
0answers
15 views

MongoDB Backup & purge [duplicate]

I'm exploring solutions for a basic dbadmin need : periodically backing up and purging data in MongoDB. Basically, I need a logrotate for mongodb. I have a backend program filling a collection. I ...
1
vote
1answer
35 views

MongoLab: Does hardware effect performance of a find() query [closed]

I asked a pervious question on StackOverflow about if document size affected the performance of fetching that document (the document is 3MB in size) ...
0
votes
1answer
67 views

cannot log in to mongo from command line - using MongoDB 3.0 and WiredTiger - I've followed all instructions

NOTE: I have tried not setting bind_ip and also setting it to 0.0.0.0 -- neither one fixed my issue. This is my mongod.conf file: systemLog: destination: file path: "/root/mongodb.log" ...
0
votes
1answer
20 views

How to force a delayed member to become primary in case of failure in mongodb

I have three member set [primary,secondary & arbiter] in my data center 1 [DC1]. Now i want a delayed member in data center 2 [DR]. In case DC 1 is completely down then my sub net application ...
0
votes
0answers
46 views

Restart failed mongodb replica set instance under docker

I am trying to simulate when the master mongod instance shuts down for some reason in mongo replica set. So I took I docker file from here: ...
1
vote
0answers
48 views

Docker Mongodb replication on different hosts is not working

I am trying to setup a mongodb replication in Docker containers running on different hosts. Please find the steps below: In a VM1 running ubuntu 14.04, installed docker, then created container C1. ...
0
votes
1answer
23 views

Running Aggregation logic on multiple shards of MongoDB

Suppose we have 5 shards in MongoDB having collection of data, and I have to write an Aggregation logic which should work on each of 5 shards in my cluster and collect data from these shards. Should ...
0
votes
1answer
22 views

MongoDB 3.0 - how do I check which storage engine is being used? [duplicate]

I have MongoDB 3.0.0 running on a Digital Ocean droplet. How can I tell which storage engine it is using?
0
votes
1answer
32 views

Understanding MongoDB Aggregation

Pretend that our collection has 1M document Now if i do aggregation like this: db.users.aggregate({ $group: { _id : "$gender", avgAge : { $avg : "$age" } } }) then how it ...
0
votes
0answers
45 views

Best way to run an ETL on a production MongoDB database

We have the following environment: 3 servers + 3 replica set servers Each server has 3 shards Our main collection has around 40,000,000 documents that average at around 6kb Our shard key is ...
4
votes
0answers
38 views

Remove a shard in MongoDB

I have a MongoDB cluster, I accidentally hosed a shard, I don't have a backup. It's pretty easy to recover the data, but after issuing the removeShard command, it says it's draining. However, the ...
0
votes
1answer
595 views

MongoDB service not working after upgrade to Ubuntu 15.04

I have recently upgraded my Ubuntu from 14.10 to 15.04. All features seems to be working fine except MongoDB. It is not controllable from service as we do normally in Ubuntu. sudo service mongodb ...
0
votes
0answers
25 views

User with more than enough permission, cannot query collection

I'm in mongo shell. I'm authenticated as a user with way beyond enough permission to simply query a collection. Yet I cannot. Here is the user permissions... What am I doing wrong and/or missing? ...
1
vote
1answer
44 views

MongoDb replica set: How do I verify data replication on other servers?

I have a 3 member replica set running. It's geo-located on 3 separate VPSs. On primary I can do rs.status() and see it's working. I can't execute any mongo shell commands on the secondaries. How do I ...
1
vote
1answer
31 views

Can we have two primaries for the same shard in mongodb?

Can we have a Mongodb deployment in two data centers in which the data set is divided into two shards A and B. Data Center 1 | Data Center 2 Shard A, Shard B | ...
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
40 views

What is the difference between hadoop, mongoDB, Big data? [closed]

What is the difference between Hadoop, MongoDB, Big data ?
0
votes
2answers
86 views

export data from SQl to text file/MongoDB

I have some data in multiple tables (ACTTAB, APTTAB, ...) How do I export this data from SQL and insert into a text file? How can I import this data into MongoDB?
0
votes
0answers
58 views

Mongodb replica set across AWS regions or subnets or data centers

I seem to have run into a blocking problem. I want a certain collection to be replicated across multiple AWS regions/subnets/data centers (eg a global lookup table or a global user credentials table) ...
0
votes
1answer
26 views

Mongo primary is showing behind the primary?

Mongo primary is showing behind the primary ?? Its increasing as time passes . Please suggest ? monRepl:PRIMARY> rs.printSlaveReplicationInfo() source: xxxxxx:27017 syncedTo: Mon Apr 27 2015 ...
0
votes
1answer
66 views

Why sharding does not show any improvement?

Here is what I did to test sharding performance. I have 4 servers, I ran config server and router on a server. 3 others are meant to be shards. First, I only added one shard to router, then I ran a ...
1
vote
1answer
53 views

Mongo Shard with Negative Average Size? [closed]

I'm seeing the following behavior from a shard in mongo: mongos> db.fs.chunks.getShardDistribution() Shard SH0 data : 740.29GiB docs : 5003098 chunks : 32949 estimated data per chunk : 23MiB ...
1
vote
0answers
84 views

Creating Pandas DataFrame on Python From a MongoDB Document containing Embedded documents

I am working on a machine learning algorithm on python's scikit.learn, but this time the data are in Mongodb documents format. I would like to pull my data into a dataframe. Here is an exemple of the ...
0
votes
0answers
17 views

Mongodb: How to resolve startup2 state

I have a shard cluster. Each shard consists of a replication set with one Primary node and an arbiter node. There is a large number of data in each shard. The host of a Primary of a shard crashed ...
0
votes
1answer
39 views

How can I create a mongo db based on mysql squema?

How can I create a mongo db based on mysql squema? this is my schema productCode VARCHAR(15) productName VARCHAR(70) productLine VARCHAR(50) productScale VARCHAR(10) productVendor VARCHAR(50) ...