All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.

learn more… | top users | synonyms

3
votes
1answer
49 views

Force a Member to Become Primary when Primary fails in mobgodb

I have mongodb 2.6.11 cluster of two members: nms02 and nms01m. I know how to force secondary to become primary when primary is avail. But now my primary nms02 failed..and nms01m is secondary...How I ...
2
votes
1answer
40 views

How to make most of aws?

I'm new to aws (just one day old). I'm impressed with aws free tier and want to utilize to its best. As of now I'm done with installing mongodb on aws micro instances and mongod EC2 instances are ...
6
votes
2answers
76 views

Force a Member to Become Primary in mongodb

I looked into answers but nothing works for me in mongo 2.6.11 cluster 'nms' (members nms01m and nms02) below. I want my current secondary nms01m to become primary, and now nms02 is primary instead of ...
2
votes
1answer
36 views

How to design mongodb collection? [closed]

We have a service will collect data and call api to save to a mongodb's collection name alldata And the problem is ,it keeps write data frequently,then the mongo will shutdown (I found on ...
1
vote
0answers
33 views

Performance issue when querying items inside circles

I need to query 300 items among 100,000+ and all of these 300 must be contained inside a set of many circles (hundreds). I am using a MongoDB database and here is a part of my logs: "command": "{ ...
2
votes
1answer
33 views

Mongodb group by queries

Lets say one of my items in a collection looks like that: { User:123 Grade : 100 } I want to sum up the grades for each student so i have this output: 123: 100, 445: 30 etc Im normal sql, its ...
2
votes
2answers
132 views

Deciding EC2 Instance type & Volume IOPS for Mongo DB

We have 500GB data in our Mongo(v2.6.3) including the indexes. We currently run this on AWS m3.large(8GB RAM) instance. Yes, Single machine. Our MongoDB Cloud Manager shows these stats: ...
4
votes
1answer
209 views

Mongo replica set with no PRIMARY/SECONDARY, members are STARTUP2 and RECOVERING

I have a mongo cluster with 6 replica sets. 5 are fine, one is not. Each replica set has three members. Here is the rs.status() for it: { "set" : "rs_5", "date" : ...
3
votes
1answer
84 views

Drop/Create MongoDB TTL index vs. collMod in production

I'm working with a MongoDB collection containing over 250 million documents that has an existing TTL index and is written to with a pretty high frequency. I'd like to reduce the TTL value for the ...
4
votes
1answer
58 views

Mongodb get Effective Lock

I´m trying to calculate the Effective Lock %, like MMS does. I think I could get it via MMS API, but most of our mongo instances currently are not monitored in MMS (and probably never will). All I ...
0
votes
1answer
348 views

MongoDB - Don't know what to do with file

Windows 10 and MongoDB 3.2 I have 2 files. One with .ns extension and one with. They are both in c:\data\dump I am trying to run mongorestore -d gnome c:\data\dump However all I get is ...
1
vote
1answer
21 views

Index selection in MongoDB 3.0 for $or query

I have a big $or query and MongoDB is not picking the index that I expect it to. Query: {"$or" : [ {"del_at" : {"$gt" : Timestamp(1448895834, 2)}}, {"rts" : {"$elemMatch" : {"k" : "app","v" ...
0
votes
0answers
58 views

REST API/ HTTP Interface Mongo not working : Only shows text “It looks like you are trying to access MongoDB over HTTP on the native driver port.”

I have below mentioned snippet in my mongod.cfgfile. net: port: 31002 http: enabled: true JSONPEnabled: true RESTInterfaceEnabled: true When I ...
1
vote
0answers
63 views

admin user creation is giving error in mongodb 3.0

I am trying to create admin user in mongoDB and it's giving me following error. MongoDB 3.0 version is being used. Error : 2015-12-10T15:23:47.065+0000 E QUERY Error: couldn't add user: Could not ...
2
votes
1answer
68 views

Mongodb Bulk find and remove is taking long time

I'm just making my hands dirty(handson) with MongoDB. First I did bulk insert of 1 million documents. // Bulk insert query var bulk = db.bulktest.initializeUnorderedBulkOp(); for(var ...
2
votes
0answers
71 views

MongoDB Replica Set CPU load [closed]

I am running a fairly standard MongoDB (3.0.5) replica set with 1 primary and 2 secondaries. My PHP application's read preference is primary, so no reads take place on the secondaries - they are only ...
3
votes
1answer
27 views

MongoDB Storage size scaling

I have a Java + MongoDB web application deployed on an OpenShift production medium gear, with no scaling enabled, with 11GB storage. At the moment, I have some data stored, so MongoDB accurately ...
0
votes
1answer
47 views

Indexing a date field on MongoDB - best practice

Hi We would like to index a date field on a potentially large collection. Is indexing a date-time field a good practice? Or should we stick to a date field (e.g. 07/12/2017) indexing (both of the ...
1
vote
1answer
70 views

mongodb bulk write all or nothing?

I am learning about mongodb. If I create a bulk write is this transaction all or nothing? I have a scenario where my users can delete who they are following. For this to happen I need to delete from ...
1
vote
0answers
33 views

How to use DBRefs to fetch records from multiple collections in MongoDB

I am working on a database for library system. I have a collection called 'books' and another collection called 'publishers'. This is my documents structure in collection 'book'. { "_id" : ...
0
votes
1answer
52 views

mongo-express isn't listing my database

I have a setup with two databases, "admin" and "local". I'm using mongo-express with this config, but only seeing my admin database: 'use strict'; var url = require('url'); if (typeof ...
1
vote
2answers
37 views

In mongodb 3.0 replication, how elections happen when a secondary goes down

Situation: I have a MongoDB replication set over two computers. One computer is a server that holds the primary node and the arbiter. This server is a live server and is always on. It's local IP ...
2
votes
0answers
558 views

Multiple IPs are not getting bind in mongodb conf file

I am trying to bind multiple IP to mongodb config file, one is 0.0.0.0 and other is 127.0.0.1. I did the following change in configuration file /etc/mongod.conf # network interfaces net: port: ...
0
votes
1answer
97 views

mongo2.6: db.serverStatus().connections nothing happened?

I wanted to create a user,and got authorize error. So I modify the /etc/mongod.conf : #auth=True And then restart the mongo,and create the user on terminal : use admin db.createUser( { ...
0
votes
0answers
31 views

MongoDB replicaset config info differs among replica members

I have a replicaset running in MongoDB3.0. I did some changes to the replicaset configuration a period after the initial setup. For some reason, I have different replicaset config information in ...
1
vote
1answer
1k views

db.serverStatus() got not authorized on admin to execute command

My mongo version : 2.6.11 I want to check db.serverStatus() in my robomomgo But got errmsg: { "ok" : 0, "errmsg" : "not authorized on admin to execute command { serverStatus: 1.0 }", ...
0
votes
2answers
83 views

i need clarifications on MongoDB

I have a few questions, hoping I can get answers. what does it mean when the Mongodb said: Clients can read documents while write operations are in progress I can see partially updated ...
0
votes
1answer
32 views

MongoDB storage of multi-dimensional arrays

Using MongoDB 3.0.7 as the primary datastore. I connect to it using ReactiveMongo 0.11 on a JVM-based language. My question is: how well does Mongo store multi-dimensional arrays? For image analysis, ...
0
votes
0answers
80 views

MongoDB. Cannot drop database

Non-sharded database. 2 replicas in repset. Connected to mongos and ran db.dropDatabase(), got OK but db is still here. Connected to mongod and ran db.dropDatabase(), got OK but db is still here. Shut ...
0
votes
1answer
43 views

Must data be evenly distributed among Mongo shards?

According to this article: https://www.mongodb.com/blog/post/on-selecting-a-shard-key-for-mongodb. Assuming I have my schema as: { time_posted: ..., userid: ..., content: ... } The ...
0
votes
2answers
58 views

Mongo HDD disk grows to fast when insert / deleting data

My Mongo version is 2.6.9 I have a application what is inserting, reading and removing data from Mongo. Thats all working fine, however the disk space increate exponentially. My HDD is around 120 GB, ...
1
vote
1answer
37 views

Mongo HDD disk grows to fast when insert / deleting data

My Mongo version is 2.6.9 I have a application what is inserting, reading and removing data from Mongo. Thats all working fine, however the disk space increate exponentially. My HDD is around 120 GB, ...
0
votes
1answer
46 views

Primary Shard Server is down, is this normal behavior?

I have two sharded Replica set RS0 RS1 The balancer is doing chunk migration between primary at RS0 to the primary at RS1. Once the primary server at RS1 goes down, then the secondary is elected ...
1
vote
1answer
58 views

Error starting MongoDB on CentOS

When I run the mongod --dbpath /data/db command to start MongoDB, I get the following error message: oot@vps [/]# mongod --dbpath /data/db 2015-11-17T21:10:54.048+0000 SEVERE: terminate() called, ...
0
votes
1answer
20 views

Track MongoDB users operations

What is the best way to track operations done on my MongoDB instance? I want to display a graph with the number of user's operations (insert, update, query etc..) done. I have read about profiling, ...
1
vote
2answers
25 views

MongoDB Replica Set Failure

Some background I had an issue with my replica set the last 24 hours, where the members could not connect to each other, and I got errors such as; could not connect to .... the machine actively ...
8
votes
2answers
3k views

MongoDB MMAPv1 vs WiredTiger storage engines

In mongoDB3 appeared a new storage engine: WiredTiger. Yet, MMAPv1 is still the default choice in Mongo. One might not be better than the other, it's often a matter of use case and choosing the ...
0
votes
0answers
30 views

Upgrade MongoDB in Ubuntu 14.04LTS

I am using 32 bit Ubuntu 14.04 LTS machine. I installed MongoDB using this command... 1. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 2. echo "deb ...
0
votes
2answers
313 views

Start MongoDB With Authentication Enabled

Well I am new in MongoDB. Just started using 2 tutorials from tutorialspoint and w3resource. I am really enjoying learning it. I think it is really the future of database management. However I have ...
0
votes
1answer
105 views

Remote MongoDB Dump Failure

I hope you can help me. I am trying to make a data dump on a MongoDB remotely, but am getting an error. I use the following command from my Windows CMD console to create the backup: C:\Program ...
2
votes
1answer
356 views

Creating a mongoDB backup/dump on remote server via local CMD/Shell

I hope you can help me. It is a question that was asked before, but I have tried all solutions, and simply cannot get it right. I have spend quite some time researching before posting this ...
2
votes
0answers
21 views

how to convert mongodb(2.4.10) startup2 to primary

I have standalone bitnami mongodb(2.4.10). The output of rs.status() command is below : rs.status() { "set" : "test", "date" : ISODate("2015-11-13T08:07:41Z"), "myState" : 5, ...
1
vote
0answers
30 views

How does defining a MongoDB shard key influence the connectivity between my mongo(s/d)s?

I am trying to test mongoDB sharding, but when following the basic steps in common tutorials, I am facing a CONNECT_ERROR issue that really doesn't make sense to me. I use four machines for this test ...
3
votes
0answers
87 views

Very slow MongoDB find query

I am having troubles with this simple query which takes a few minutes. db.data_items.find({'observation_target.observation_target_id': 2190}).limit(20000) The explain output shows that the query ...
1
vote
1answer
468 views

DBClientCursor::init call() failed

During syncing a slave(SECONDRY) node, I have DBClientCursor::init call() failed error and it's start syncing from scratch, the full log is provided: Tue Nov 10 05:54:56.281 [rsSync] clone ...
2
votes
1answer
28 views

MongoDB odd sizes

I'm new to MongoDB (using mongo 3.05)- and was seeing a behavior I didn't quite understand or could find an answer to - When I show the DBs in the mongo environment = I see a list of the databases ...
0
votes
2answers
49 views

Close MongoDB dead connections

I have a script that connects to my local mongos and do some processing. However, during the process, I encountered many cursor timeout exceptions, which (I suspected) left many dead connections on my ...
0
votes
1answer
37 views

Data model Reference and schema

I just started to learn MongoDB database and for my project. I am trying to implement a MongoDB reference schema. In my Menu table I would have a food ingredients attributes where it will store the ...
1
vote
1answer
44 views

Mongo database error in resource allocation

pthread_create failed: errno:11 Resource temporarily unavailable maximum number of open files 64000 maximum number of processes 64000 It is taking 50seconds to complete query. How to allocate ...
1
vote
1answer
129 views

Social network DB model in MongoDB

I am building a story site for pre school The basic functions are students will be posting stories and others will be able to like/comment on that story Below is the model of the DB Stories ...