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

learn more… | top users | synonyms

3
votes
2answers
608 views

Why does mongodb require three config servers

The official mongodb documentation states to use three config servers. They say its for redudancy, because 1 server would be a point of failure.... but why not 2? in a production sharded cluster, if I ...
3
votes
4answers
791 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
1answer
2k views

Why does mongodb virtual memory get so large

I have just compiled MongoDB in my linuxOS and not insert any data into DB. The virtual memory is getting very large, about 40G. ps aux|grep mongod mongodb 176574 0.0 0.0 423784 39008 pts/...
3
votes
1answer
2k views

Mongo authentication user can't drop database

my question is - is it possible to define user in the Mongo database who will be able to drop the database? Maximum user privilege is "dbAdmin" but that privilege doesn't allow users to drop the ...
3
votes
2answers
191 views

What are the best Database Analytics Companies for analyzing several 1000s or Mio. of products,sum them together and analyze them for statistics?

We will get several thousands products in our database. The problem is that one product can have several different names e.g. "iPad 16GByte UMTS schwarz" or "iPad 16GB 3G black" and so on. But they ...
3
votes
1answer
50 views

How do I know that I am connected to a config server

I need a simple check for identifying that I am connected to a MongoDB config server. I can check the process to differentiate between mongod and mongos: > db.serverStatus().process; mongod Now ...
3
votes
1answer
130 views

Mongodb incremental oplog Dump not working

I am not able to take an incremental oplog dump. I am not getting any error messages the connection happens fine and also there is a operation recorded(shows up in db.currentOp()), but still nothing ...
3
votes
1answer
49 views

Does it make sense to limit Mongo RAM?

I have a Windows server running MongoDB. My database has big indexes and all RAM is usually busy. As I know, it can be a cause of Windows swapping and performance issues. Does it make sense to limit ...
3
votes
2answers
262 views

When is the _id index used?

When is the _id index used by MongoDB? I could not find anything specific about it in Index Introduction, Analyze Query Performance, and Query Plans. When sorting by _id at the end of the query via ....
3
votes
1answer
104 views

Mongo Scaling - Too Many Connections - Linear Horizontal Scaling with 100s of App Servers

I have a Mongo Cluster. It's sharded on 6 servers, with 6 replica sets, each replica set having one Primary, and two Secondaries. Additionally, there are 3 config servers. Though, I think the Mongo ...
3
votes
2answers
4k views

Upgrade mongodb from 2.4 to 3.0

I have mongodb 2.4 database with some indexing. Now I want to upgrade that version to 3.0. I searched on google but did not find any firm answer. I tried installing 3.0 but then it gives me error of ...
3
votes
1answer
2k views

MongoDB ReplicaSet reconfig when primary and majority don't exist

http://docs.mongodb.org/manual/tutorial/reconfigure-replica-set-with-unavailable-members/ Is there anyway to reconfigure a replica set in the event the primary as well as a majority of the servers ...
3
votes
1answer
1k views

mongodb: maxTimeMS ignored

After trying with different drivers and clients, we suffer with mongodb timeout on find query. Even Profiling logs the settings and issue well. 2014-08-13T23:46:43.218+0200 [conn80] query ...
3
votes
1answer
7k views

mongodb: drop all collections

How to remove existing content before entering a replicaset the first time? mongodb worries about: ... has data already, cannot initiate set. All members except initiator must be empty.
3
votes
1answer
334 views

Does mongodb automatically move small non-partitoned databases to spread read load?

I have a few hundred small databases, each between 0.2GB and 4.0GB in size. These are sitting on a sharded mongodb environment with 10 or so shards. At any one time, only a very small subset of these ...
3
votes
1answer
147 views

MongoDB: Should I combine fields for performance in limited circumstances

I have a really simple MongoDB collection: { "user": 1, "domain": "example.com", "apiAccess": true } There's an index on the "user" and "domain" fields. I always perform the same type of ...
3
votes
1answer
35 views
+200

Sharding Balancer and long running query problem

I have problem on my Sharding. There are a couple of long running queries observed, running for more than 3 hours. My question is, are the below things interrelated? What is the issue? How do I fix ...
3
votes
1answer
29 views

MongoDB: Can I have a delayed secondary that doesn't vote?

I have a replica set setup with 1 Primary, 1 Secondary and 1 Arbiter; each on a different data center. I want to add a delayed secondary to one of the existing data centers, but I don't want it to ...
3
votes
1answer
95 views

Improving mongodb read throughput for tiny database

I am given to understand that MongoDB will essentially perform like it is pulling records from memory if the working set is small. I wrote a simple MongoDB test program that inserts just one record ...
3
votes
1answer
48 views

Is it dangerous to expose MongoDB's db.collection.find to users?

I know in SQL land people love referring to Little Bobby Tables as the main reason to have a very strict interface between your user base and your database. However, I want to implement a robust ...
3
votes
2answers
141 views

MongoDB just utilizing one CPU core

Would anyone happen to know why Mongo is just using one core instead of distributing traffic on all? I am using the PyMongo driver and MongoDB is running on a centos server.
3
votes
1answer
84 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 ...
3
votes
2answers
214 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: ...
3
votes
1answer
297 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 ...
3
votes
1answer
1k 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. ...
3
votes
2answers
206 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 ...
3
votes
2answers
497 views

Running MongoDB and SQL Server on the same host- memory pressure

We have a new application that is making use of both traditional MS SQL and MongoDB for data storage. We're running both instances on the same Windows 2008R2 x64 machine, with 64GB RAM. There have ...
3
votes
1answer
5k views

How to create an efficient, scalable, multi-tenant data layer using MongoDB? [closed]

I'm working on the architecture for my upcoming Project Mangement app (as an example) and I'm seeking clarity on how best to design the MongoDB data layer, with specific regard to multi-tenancy. The ...
3
votes
4answers
4k views

Why is Mongo stuck in STARTUP2?

I have a Mongo replica set with a few secondaries. A box, which hosts a secondary instance, crashed and lost the database. I started the secondary Mongo instance again and now it's stuck in STARTUP2 ...
3
votes
2answers
1k views

How much free space do I need for mongoDB? and how to reclaim lost space?

I ran out of disk space on my mongo database. I saw it and dropped some collections (120 out of 1700 i had). And ran db.compact(...) thinking it would release free space. well, that was a stupid idea. ...
3
votes
1answer
215 views

Accessing unsharded database in a MongoDB shard cluster without going through mongos?

As far as I can understand, not all databases in a MongoDB shard cluster have to be sharded; I can keep some databases unsharded, on only one of the shards. So suppose I have a shard cluster, with ...
3
votes
2answers
3k views

Primary replica set server goes secondary after secondary fails

I have a 2 servers replica set that, after the secondary fails the primary goes into secondary mode while the secondary is in STARTUP2 (recovering). The problem with this is that I can't use the ...
3
votes
1answer
1k views

MongoDB geospatial query with sort - performance issues

I have query (which is very slow ~2,5s): db.markers.find({ latlng: { '$within': { '$box': [ [ -16, -140 ], [ 75, 140 ] ] } } }).sort({_id: -1}).limit(1000) When I run explain for this query I get {...
3
votes
1answer
1k views

Mongo connection failing with 'Transport endpoint is not connected'

I have a 2 server installation. A web server with Apache and a DB server with MongoDB. I am load testing it, and on ~300 RPS I am getting this error: PHP Fatal error: Uncaught exception '...
3
votes
2answers
29 views

What is the difference between mongod in standalone vs replica set

I've been running Mongodb as a replica set on 3 servers (primary, secondary and arbiter) but because I have to downscale I'm converting the primary to a standalone server. Before this change the ...
3
votes
1answer
80 views

replica set in MongoDB using docker, primary has error and stops being primary when another member is added to the set

I have two docker containers running a mongo instance each, they were initialized like this: docker run --name mongodb-shard-1-node-1 -d -v mongodb-shard-1-node-1:/data/db -p 27031:27017 mongo --...
3
votes
1answer
41 views

Backup on both secondaries or a dedicated backup secondary

In my current replica set setup, I have a a primary and 2 secondaries (both a normal secondaries - priority 1 on each, no delay, no hidden). Note that reads and writes are only against the primary. ...
3
votes
1answer
35 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 can'...
3
votes
1answer
1k 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 ...
3
votes
1answer
232 views

Error while changing the authentication - mongoDB

I had database level authentication in mongoDB, I had tried to change the password for existing user. It is throwing not authorized error. Steps i followed to change the password use wallet db.auth("...
3
votes
1answer
3k views

Query elemMatch Date

I have a document structure like this: { "_id" : ObjectId("5359816b036493327d7cae95"), "_class" : "com.myproject.MyObjectDTO", "signals" : [ { "signalType" : "ABC", "quantity" : ...
3
votes
1answer
2k 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 ...
3
votes
3answers
2k views

mongodb service not running after changing path

I have changed the dbpath of mongodb.conf. And after that trying to start mongodb service,when I run sudo service mongodb start I get back mongodb start/running, process 7320 After that I run: ...
3
votes
1answer
421 views

Best embed/reference/field strategy for many inserts (mongo)

I'm building a gaming backend with Mongo, and have some issues on how to best design the schema to maximize performance and database size. My models: User Match -ReferenceMany (User) -...
3
votes
1answer
1k views

MongoDB: queue vs. realtime write/update

On a large mongoDB I have 2 different use-cases for reading and 2 different types for write/update. read 1: find by index -> no question on this. this works like a charm - as long as the index fits ...
3
votes
1answer
590 views

Could a large log file be the reason cron job keeps dying?

The log is 15 Gigabytes. I guess I have to back it up and delete. I have enough hard disc space, but did not realize log was so large. And overnight cron jobs suddenly started to die in the middle.
3
votes
2answers
32 views

MongoDB not using all memory in Windows server

I have a stand-alone MongoDB instance running in windows. It's recently experiencing slowness and my troubleshooting has found the following symptoms. The slowness normally occurs after a full text ...
3
votes
0answers
35 views

How to assign 'findandmodify' privilege to a mongo user?

I'm running a Mongo 2.6 replica instance where a node application needs to talk to. Basically nothing much was setup except these parameters: # where to write logging data. systemLog: destination: ...
3
votes
0answers
65 views

Read replica setting giving error “No candidate servers found”

I am running my website with Laravel 5 + MongoDB. I am using mongo cluster to speed up data read and write, and to lower CPU usage of the mongo server. I have set up the replica like this: 10.0.1....
3
votes
0answers
49 views

AS/400 + DB2 to MongoDB?

I'm not seeing a whole lot of info on the subject, so I figured I'd ask people who might know more about it than I do: Is it possible to replicate data from an AS/400 + IBM DB2 instance to MongoDB? If ...