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

learn more… | top users | synonyms

3
votes
1answer
52 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
54 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
89 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
18 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
33 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
31 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
34 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
39 views

MongoDB Replica Set CPU load

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
26 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 ...
1
vote
1answer
37 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
32 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
25 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
36 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
30 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 ...
1
vote
0answers
153 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
48 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
24 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
324 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
54 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
24 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
47 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
28 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
47 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
26 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
44 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
40 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
23 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 ...
2
votes
1answer
1k 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
20 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
103 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
43 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
172 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
14 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
25 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
62 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
167 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
27 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
1answer
22 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
32 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
22 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
68 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 ...
0
votes
1answer
34 views

JSON to BSON in mongoDB

I have a little bit confusion how the json data internally organized (physical storage structure for dynamic schema objects) db.some_collection.insert({x:1,y:4,z:34}) ...
0
votes
0answers
11 views

Load on Mongodb secondary server spike suddenly

Can you please let me know, suddenly load on mongo server secondary instance increase for 10-15 min and then it become normal. I checked iostat, mongotop it seems everything is normal. only read ...
2
votes
1answer
506 views

Error parsing YAML config file: yaml-cpp

I'm using the following command (Windows machine) with the MongoDB shell version: 3.0.7: mongod --config "G:\NodeApps\mongod.cfg" --install Contents of mongod.cfg file are given below: systemLog: ...
1
vote
1answer
49 views

From RDBMSs to MongoDB

I've worked exclusively with RDBMSs for the past 10 years and am trying to explore something new to me like MongoDB. I’m trying to learn about data model design in this environment and because ...
6
votes
1answer
15 views

Mongos not returning existing data in shards

So we have a configuration of 2 shard (each is a replica set) and one sharded collection. There are around 10 million records in each shard. We are using mongo 2.6.4 version. We have sharded with ...
0
votes
1answer
60 views

mongodb moving value from NumberInt to NumberLong

We are trying to preallocate documents in a collection. Usually NumberInt for our values is sufficient. When we get 1million writes into that document (it is one doc per day time series, so 1 million ...
2
votes
1answer
46 views

Can I add an Arbiter node in the same server of my Config-Server?

I'm using MongoDB and I want to know if I can add an Arbiter node in the same server that I'm hosting my Config-Server. Is it possible? Let's say that I have 3 sharded clusters with 6 servers (2 per ...
1
vote
1answer
35 views

Is MongoDB Connections getting too high?

I currently have my MongoDB running in Production Environment. It has 1 Primary, 1 secondary and an Arbiter. Configuration of the ubuntu machines are pretty decent, it's got 56GB of RAM and about ...