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

1
vote
1answer
72 views

Mongodb sharded cluster backup user issue

We're using a simple python script to backup our mongodb cluster. the script connects to each mongod instance via ssh, and performs mongodump, all without requiring user/pass ever since we started ...
0
votes
1answer
176 views

MongoDB: The collections metadata lock is taken

Running a mongodb 2.6 cluster on localhost with four shards and four replication sets. Using a for loop with 100 iterations that pre-splits chunks among the existing shards. I am getting the error ...
0
votes
1answer
53 views

MongoDB only three of four shards being used

Using MongoDB 2.6, I've setup four replication sets: a, b, c & d: >rs.conf() a:PRIMARY> rs.conf() { "_id" : "name_of_replset", "version" : 1, "members" : [ { ...
1
vote
1answer
84 views

In shard cluster, if 2 replica set nodes are offline leaving only 1 secondary..where do writes go?

This is probably a simple question that i can't get definitive answer too. If i have 10 shards, each being a 3 node replica set. If i loose 2 servers in a replica set causing the primary to change to ...
3
votes
1answer
55 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 ...
1
vote
0answers
256 views

Neo4j vs mongodb [closed]

I want to store data of parents,teachers,students,subjects and the respective marks. All these entities are highly interlinked. Different schools have different type of data and each student will have ...
1
vote
1answer
252 views

Mongodb: slow shard balancing

I've decided to shard a collection with 500M+ documents into 24 shards. All shards are on the same machine without replicas as was advised in this title (core sharding). The shard key is {"_id":1}. I ...
2
votes
0answers
179 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 ...
0
votes
1answer
100 views

Maximum number of fields/columns in MongoDB

I'm considering learning and using MongoDB for a project, but I'm going to need to be able to store at least 1024 columns for the first part, and as many as 1048577 for the second. Does MongoDB have a ...
0
votes
0answers
29 views

Searching larger documents

I'm currently developing an application where I want to use MongoDB for the main database. I'm trying to store the emails metadata inside the database. My schema: user_id (integer 32bit) -- index ...
2
votes
2answers
805 views

MongoDB YAML file problems on Windows

I managed to get MongoDB running as a three member replica on Windows 8, but I had problems with configuration files. If I used the new (MongoDB 2.6) file format (YAML) and used the replica set name ...
1
vote
1answer
63 views

Creating Replicas Across Servers

I'm having some issues creating a replica set of my MongoDB. I have server A. Currently, it is setup as a local standalone replica. rs0:PRIMARY> rs.status() { "set" : "rs0", ...
0
votes
2answers
508 views

Write a query which add two fields of a document and compare their sum to third field in mongo

I have one document say db.pageTrendLog.findOne(); { "_id" : ObjectId("538b7128cf16e3ea5a1ab23c"), "pgDownloadTime" : NumberLong(9776), "pgAccessTime" : ...
1
vote
0answers
18 views

Modeling for inclusion of two different entities

What I Have I am currently hashing out the data model for an application that will utilize MongoDB. In my setup, users or members (as they are called in the schema) will be created and then assigned ...
0
votes
1answer
761 views

Storing multidimensional array in MongoDB

I am attempting to convert a large MySQL database of product information (dimensions, specifications, etc) to MongoDB for flexibility and to move away from the restriction of a column based table. I ...
0
votes
2answers
45 views

Which database for survey app [closed]

I need to build a very simple mobile survey app. The app will ask for different questions where people can give one of 3 possible answers, which will be always "yes", "no" or "maybe". To save ...
0
votes
1answer
80 views

MongoDB - sharding

I have a sharded cluster with 4 shards, 3 config databases. My problem is when I do my inserts only one shard gets filled. Can anyone please explain to me why this is happening. My first thought was ...
0
votes
0answers
73 views

mongodb logRotate on windows server 2008

Running mongodb on a windows server 2008 R2 as a service in trying to do a logrotate for my mongod processes. I currently have a replica set 3 replicas. when i issue the command: (rotate.js) ...
0
votes
1answer
316 views

Mongos down when I shutdown one of three servers

I deploy 3 server of mongodb, layout is node-01: mongos config server 1 replication server 1 node-02: mongos config server 2 replication server 2 node-03: config server 3 arbiter After ...
1
vote
1answer
604 views

MongoDB insert performance rapidly dropping

I'm currently experiencing a rapid decrease of the insert Performance. I have a rather simple data model { "Id": "ObjectId", "SomeProp": "xy", "SomeTags": [ { "key": ...
0
votes
1answer
138 views

Split Vector is taking too much time in mongo shard

I am using mongo shard distribution system. This system performs slow as the data size increases. I checked with profiler and saw split vector is taking to much time while running. It happened after ...
1
vote
0answers
172 views

Restore backup to staging replica set

I have a staging environment with Mongo replica set which I refresh on a regular basis. Refresh is done automatically using a bash script. Staging replica set consists of 3 members (primary, ...
0
votes
1answer
373 views

MongoDB - Adding a new server to an existing replica set with auth enabled

Short version: Is there a way to add a new SECONDARY server to an existing production MongoDB replica set without downtime, and without temporarily disabling the "auth" and "keyfile" config settings ...
3
votes
1answer
206 views

How are Mongodb indexes stored on disk?

So let me first start the question with my understanding of how MongoDb stores data on disk: So when you create a database in mongodb, it allocates a large file named <databasename>.0 and within ...
1
vote
1answer
322 views

Removing Database from sharded cluster in Mongo DB

I Have a mongo shard db system with two shards and and three mongos servers.My application creates DB on daily basis as per our business requirements. We have some sharded collection in each day DB. ...
0
votes
0answers
49 views

Collection VS lots of Fields

As of the moment we are having this collections RptCustomer RptCustomerMonthly RptCustomerDaily RptStoreCustomer RptStoreCustomerMonthly RptStroreCustomerDaily RptFranchise ...
2
votes
0answers
312 views

“Host has low open file limits” error in MMS

I am running Standalone MongoDB (v 2.6.0 64-bit) host on Centos (v 6.5). Centos is guest OS on Windows 7 host running under VirtualBox (4.3.10). MongoDB process runs under root account. And it is ...
3
votes
1answer
349 views

high background flush avg mongodb

similar question: High Global Lock % on Mongodb Overview We have a production setup replica set in v2.4.8 mongodb running on five 4-core, 28gb RAM VMs with standard azure datadisk HDDs running on ...
0
votes
1answer
46 views

Admin DB replicated in MongoDB replica set

I'm setting up a mongodb replica set across 3 different hosts. If you create the admin user on one host and turn on auth and keyfile in the /etc/mongodb.conf, do you have to create that same user on ...
0
votes
3answers
279 views

Mongo takes too much memory when insert data

I'm using mongo as a database log. I store on it all the logs of an application, so I have a high rate of inserts, for example 100 inserts per second. To accomplish that I developed a part of the ...
1
vote
1answer
53 views

Merging MongoDB files

Mongo stores data in files named xxx.0 and xxx.ns under the db folder. Is it possible to copy these files to another machine where I have a mongo instance running and merge them to create a single ...
1
vote
0answers
60 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 ...
2
votes
1answer
424 views

MongoDB - Query elemMatch Date

Having a document structure like this: { "_id" : ObjectId("5359816b036493327d7cae95"), "_class" : "com.myproject.MyObjectDTO", "signals" : [ { "signalType" : "ABC", "quantity" : ...
0
votes
1answer
31 views

No connections to mongodb replset member post outage

I have a weird issue in MongoDB. Let me explain. Suppose, I have following components of mongodb: A shard with a replset containing 3 members, with 1 primary(say A) and 2 secondary nodes (say B and ...
2
votes
3answers
443 views

How to limit MongoDB database size

Are there any mechanisms to limit the size of a single database on MongoDB 2.6? I found some options like quota, quotaFiles and nssize but am unsure how to use them.
2
votes
1answer
69 views

What are these files in MongoDB?

I was looking into my server and I found this: [root@host ~]# cd /var/lib/mongo/journal/ [root@host journal]# ls -lh total 3.1G -rw-------. 1 mongod mongod 1.0G Apr 7 01:18 j._0 -rw-------. 1 mongod ...
0
votes
2answers
422 views

Durability and other limitations in mongoDB?

I've created web app that use mongodb, my mongo database currently has 4,05 GB , but every day it increase, next year it will probably have about 8 GB , I have python scripts that runs every 30 ...
1
vote
1answer
335 views

SpringData MongoDB - infinite getmore on mongo logs

Doing 2 queries on MongoDB through Spring Data on around 160 000 rows, query 1 is executed in few seconds (about 20 results) but query 2 never finish. I'm getting this line over and over on mongodb ...
0
votes
0answers
42 views

When enable authenticating in MongoDB, how to use mongo_fdw?

I test mongo_fdw these days, It's ok when mongodb disable the auth authenticate, but if the mongo enable the auth authenticate, should we create a mapping user for the foreign table? what shoud we ...
1
vote
1answer
94 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 ...
0
votes
1answer
755 views

mongodb 2.6 mongos start up failed

I'm trying to run mongodb 2.6, everything followed my 2.4 version setup steps. but when I start mongos I got the following problems and just cannot make it. 2014-04-24T03:38:31.001+0800 [mongosMain] ...
1
vote
1answer
600 views

Error while accessing remote mongo db

Trying to access remote mongo db. Got the following error: C:\Users\ranjj_000>mongo <SERVER_IP_HERE>:28017 MongoDB shell version: 2.6.0 connecting to: 111.93.128.60:28017/test ...
0
votes
1answer
28 views

MongoDB Writing issue

I use mongodb (2.0.6) on my servers (Debian 7.0). On one of my servers I see something strange... The disk IO is very very high constantly, and when I use iotop I see this: 32704 be/4 mongodb ...
1
vote
1answer
1k views

Can't take a write lock while out of disk space

Help me please! My C:\mongodb-win32-x86_64-2.4.6\data size is 8G. I have 95G free space of drive C. But I get this message: com.mongodb.WriteConcernException: { "serverUsed" : "/127.0.0.1:27017" ...
1
vote
1answer
402 views

MongoDB on Raspberry Pi --dbpath not setting

I installed MongoDB using this tutorial. I have tried to set --dbpath in /etc/mongodb.conf like this: dbpath=/path/that/iwant #where to log logpath=/var/log/mongodb/mongodb.log logappend=true ...
1
vote
1answer
426 views

Mongodb 2.6 Server crash and not restarting

We are using mongodb 2.6 with one Primary and 2 secondaries. One of the secondary has gone bad and not restarting. 2014-04-18T21:13:34.765+0000 [rsSync] replSet still syncing, not yet to minValid ...
0
votes
1answer
23 views

Upgrade MongoDB meta-data after binary upgrade

I upgraded our MongoDB binaries from 2.2.5 to 2.4.9. I did not follow one of the considerations prior to upgrading: To upgrade to 2.4, sharded clusters must upgrade following the meta-data upgrade ...
0
votes
0answers
385 views

Are mongodb bulk inserts really increase server perfomance (and faster)?

Bulk inserts always are faster in client side because of saving round-trips, but at the server-side is there any sensible performance improve? It seems the code for bulk inserts, just loops over ...
1
vote
0answers
233 views

Best design of mongo replica set for DB read/write speed

I'm building a Node app that uses MongoDB. Whilst it would probably be fine to have node and mongo sitting on the same VPS, I want to ensure that the MongoDB is backed up and maintain high ...
0
votes
0answers
429 views

Mongodb: Waited too long for lock balancer to unlock

Mongo Version: 2.4.5 OS: Windows Server 2008 R2 Standard (Service Pack 1) We have a balancer idling for a day doing nothing (no recent records in changelog), holding a lock state 2. Tried to stop ...