Tagged Questions

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

0
votes
1answer
27 views

Mongo DB - reading during update

Is it possible in a three-member-replica set (1 primary, 2 secondaries) to update records on the primary, or even delete several records and insert the updated data, and still execute read-ops on the ...
0
votes
1answer
80 views

how to split the chunks in sharding

I have edited the question. I was trying to run the sh.splitAt mongos> sh.splitAt("test.zp",{"city": "1"})it worked. But the problem is at sharding chunks. when i have run the command ...
0
votes
0answers
114 views

mongodb balancer does not move chunks because of obscure error

After carefully following this guide, on how to migrate a 3 member replica set to a shard containing 2 X 3 member replica sets, after sharding one of my collections nothing happened. Looking into the ...
0
votes
1answer
61 views

Mongo DB Backup & restore

0 down vote favorite I have a DB with 150GB of data. I am using the MongoDump and Mongorestore methods to backup and restore. My production server is running Mongo 2.2 and my test server is 2.6.1 ...
0
votes
1answer
83 views

MongoDB - temporarily turn shard to standalone for local user creation

Following question Mongodb sharded cluster backup user issue I have a sharded mongodb cluster, with 4 shards, and I'm required to stop the mongod service on each shard, and start it not as a part of ...
3
votes
1answer
226 views

MongoDB presplitting chunks for compound shard key

In my mongodb setup I have a compound shard key {"region" : 1, "foo" : 1, "bar" : 1} and I know the values region can be and that each region should be on one chunk. Therefore I'd like to pre-split ...
0
votes
1answer
205 views

Huge size on mongodb's gridfs. Should I compact ?

I'm running mongodb and grid.fs to store small files (less than 20mbs). These are part of a replica set. I currently have more than 350000 files stored. I've noticed that the chunks collection takes ...
1
vote
0answers
131 views

MongoDB Replica Set: Can't Add Member/Connect

I'm building a MongoDB replicaset w/ three Ubuntu 14 servers. I'm connected to the primary server and authenticated w/ userAdminAnyDatabase and clusterAdmin privileges. When I run ...
1
vote
1answer
66 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
133 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
52 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
69 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
52 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
254 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
195 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 ...
1
vote
0answers
144 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
83 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
1answer
636 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
50 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
423 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
635 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
44 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
70 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
53 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
275 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
415 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
132 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
151 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
308 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
183 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 ...
0
votes
1answer
251 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
48 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
283 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
309 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
43 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
240 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
47 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
53 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
357 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 ...
1
vote
3answers
350 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
67 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
351 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
271 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
38 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
88 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
689 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
543 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 ...