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

Data migration from SQL Server to MongoDb [on hold]

I need to migrate some data from Sql server to MongoDb collections. Data structure could be not equivalent. I need to set custom mapping rules. Can you advice me a tool that is able to perform that ...
1
vote
0answers
13 views

mongodb is using most of disk space for journal and not cleaning itself

I am using mongodb on production with journal enabled. I am using mongodb to store application data and also using gridfs to store images. I am using Elastic Block Storage (EBS) with 10GB for each ...
0
votes
1answer
8 views

How to get minimum value in pyMongo

I have a collection with several fields, and I'd like to get the minimum value from one. I know a command for getting the max value: collection.find_one(sort=[("myfield", -1)])["myfield"] but not ...
0
votes
0answers
13 views

Running out of disk space when removing documents error

I'm trying to remove unused document from a production instance of MongoDB but, when I try to execute this query: db.collection.remove( { date: {$lt: new Date((new Date())-1000*60*60*24*90)} } ) ...
2
votes
0answers
24 views

Mongodb incremental backups

I was given the task to setup incremental backups for mongodb replicaset, as start point of course I googled about it and could not find anything on mongodb docs, I did find however this question ...
1
vote
1answer
15 views

WiredTiger - “too many open files error” during resync of a secondary replica set member

I'm upgrading a secondary replica set member to wiredTiger. I have upgraded it from MongoDB 2.6.3 to 3.0.4 and changed the storage engine to wiredTiger. Now it is resyncing all data from the primary. ...
1
vote
0answers
14 views

MongoDB user account required for arbiter?

I have a test environment with two mongo v2.6.5 instances (#1, #2) and an arbiter instance in a replica set. I have a a common key file configured for all three instances. I have created an admin ...
0
votes
0answers
18 views

MongoDB create user readWriteAnyDatabase but without the ability to create new DB

I want to create a single user who can read and write to any existing DB, but wouldn't be able to create new DBs. I want to give that privilege only to the dbAdmin. I have tried to create a user with ...
0
votes
1answer
37 views

Database system to store very large amount of data [closed]

I am developing a website in PHP, in which I have to import about 10 million records per day from the existing system. My question is which database system I can use to manage this amount of data. ...
0
votes
0answers
19 views

Mongodb exception in initAndListen

My MongoDB server was full so Mongod service could not start. There was a specific db that I didn't need, so I have deleted its file from the dbpath. Now when I try to start the service again I'm ...
2
votes
2answers
43 views

Backup with mongoexport or mongodump?

For production backup, MongoDB recommends mongodump instead of mongoexport for accuracy of data. However, I would need to "scrub" data off a MongoDB database before backing it up. I am not aware of ...
1
vote
0answers
13 views

Should mongodb be run in a service, or a worker cluster?

I'm trying to implement an architecture that's similar to the coreos's production architecture (shown below) Should I run the database as a central service or one or more of the workers? I figured ...
0
votes
1answer
26 views

Bypassing LDAP for MongoDb Users

Environment: MongoDb: 3.0 Enterprise Edition Linux: Red Hat Enterprise Linux Server release 6.4 (Santiago) Use case: We need to have the above three MongoDb users which are not present in LDAP ...
3
votes
1answer
49 views

MongoDB: dbclient_rs replSetGetStatus failed{ ok: 0.0, errmsg: “unauthorized” }

When I'm using mongodump or mongorestore on a replica set these messages appear in the verbose output: dbclient_rs replSetGetStatus failed{ ok: 0.0, errmsg: "unauthorized" } The replica set is ...
1
vote
1answer
25 views

mongoDB design - to embed or not to embed

Let's say I have a mongoDB database with 3 collections: widgets thingomajiggers locations The way the application is going to be used that I will always force the user to specify a location ...
0
votes
1answer
12 views

mongoDB: querying for a document that has an object reference

I have a widgets collection that has records like this: { "_id" : ObjectId("55a6abe193819c033d4d755a"), "name" : "widget1"} { "_id" : ObjectId("55a6abe193819c033d4d755a"), "name" : "widget2", "loc" : ...
0
votes
1answer
33 views

MongoDB sharding

I have a questions about mongodb sharding. I have 7 VM with 1 master mongos and 3 config server en 3 shard servers. Mongo Main - 192.168.212.173 poort 27020 Mongo Shard1 - ...
0
votes
1answer
17 views

Client not reading from Mongo secondary database

I've implemented a replica set that I'm using globally. I have my master in Oregon, US and 4 secondaries. California and Virginia, Frankfurt and Sydney. I also have web servers in those same regions ...
1
vote
1answer
20 views

Why does MongoDB extend FileSize if it is already 5x larger than DataSize

I recently had to assign more diskspace to my MongoDB 2.4.8 instance. This instance continually receives transactions, makes some updates and then deletes them after 3 months. I would therefore expect ...
1
vote
0answers
29 views

mongoDB - how to link one embedded object to another embedded object

Background Information I'm trying my hand at my first mongoDB database. So far, I've decided that I will need to use both references and embedded data models. One of the features of this application ...
0
votes
1answer
45 views

How to manage RAM consumption in MongoDB?

I am using MongoDB. I have a hardware device which continuously submits data to the database every 10 seconds for 4 hours a day. The data includes latitude, longitude, and other basic information of ...
0
votes
1answer
61 views

MongoDB eats 100% CPU when idle

I am running in OpenVZ container with Ubuntu 14.04 LTS. MongoDB version: db version v3.0.4 git version: 0481c958daeb2969800511e7475dc66986fa9ed5 I use clean installation like described here - ...
1
vote
1answer
43 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
1answer
75 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
20 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
1answer
22 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
38 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
11 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
34 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
30 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
41 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
40 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
18 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
25 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
12 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
99 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 ...
2
votes
0answers
25 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
102 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
1answer
81 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
55 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
25 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
29 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
40 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
26 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
73 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
39 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
89 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
26 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
58 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: ...