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

learn more… | top users | synonyms

3
votes
1answer
1k 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
47 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
115 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
48 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
219 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
97 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
3k 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
3answers
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
1answer
329 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
145 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
93 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
2answers
93 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
69 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
1answer
275 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
203 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
483 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
4k 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
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
206 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
1answer
44 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

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
1answer
31 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 ...
3
votes
1answer
220 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 ...
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
419 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
588 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
20 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
24 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
54 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: ...
3
votes
0answers
39 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 ...
3
votes
1answer
34 views

Mongodb. Convert field to bool

I'm trying to change field type to bool among all documents in collection. Here is the code db.product.find().forEach(function(doc) { if (doc.checked === "Y") { doc.checked = true; } else if ...
3
votes
1answer
105 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 ...
3
votes
1answer
29 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 ...
3
votes
0answers
93 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 ...
3
votes
1answer
99 views

Optimize mongo inserts

I have a very write intensive application that I want to optimize. Additionally I don't care about losing data in a crash, as long as there is no corruption in the existing ones. Is it safe to run ...
3
votes
0answers
623 views

Mongo not using enough RAM, and is slow

Our Production Mongo appears to be behaving weirdly. As far as I have read, Mongo should eat up all the available RAM to cache Index and Data in memory but in our case it is not doing so. Our ...
3
votes
1answer
500 views

MongoDB text index and text search

I have a mongodb collection db.articles,it has 2 keys ,"title" and "abstract".I want to do text search on these two keys.For example, the search text is "physics",and I want all the documents whose ...
3
votes
1answer
2k views

verify that mongos server is connected to config servers

I've been writing a backup script for sharded replica-sets and it's almost done, except that I can't seem to get it to successfully start the balancer back up after everything's all said and done. ...
3
votes
0answers
167 views

automated data sync after Primary node is down

I have this scenario, using version 2.2.2: Node A, Primary, Priority: 10, Wireless network Node B, Secondary, Priority: 9, VM Server1 Node C, Secondary, Priority: 8, VM Server1 Sequence: In Node ...
3
votes
2answers
5k views

Mongo replicated shard member not able to recover, stuck in STARTUP2 mode

I have following setup for a sharded replica set in Amazon VPC: mongo1: 8G RAM Duo core (Primary) mongo2: 8G RAM Duo core (Secondary) mongo3: 4G RAM (Arbiter) Mongo1 is the primary ...
2
votes
2answers
2k views

Disk space recovery on Mongodb replicaset secondaries

Is it possible to recover disk space on replica set secondaries based on the results of a repairDatabase call performed on a primary? I can't seem to locate anything that would work short of bringing ...