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

1
vote
1answer
147 views

Tuning Mongo (TokuMX) for fastest bulk reads

What options do I have for tuning MongoDB / TokuMX for reading the results of queries with large result sets? I'm currently on a single server (no sharding) with the data on an SSD drive. My queries ...
-1
votes
1answer
47 views

Disable MongoDB journaling?

Are there any benefits in disabling mongodb journaling besides performance gain? I know journaling provides write durability and crash resiliency. But I can tune syncdelay parameter to make data files ...
0
votes
1answer
39 views

mongodb - “replication oplog window” possibly reduced due to profiling - when profiling disabled no change?

PROBLEM I have a 3 member replica set (no sharding) running mongodb version 2.4.8. Using MMS (Mongo Monitoring) I can see that on 7th July 2014 at 12:00 my "replication oplog window" dropped from ...
0
votes
0answers
51 views

mongodb master slave replication

I Have Setup master slave replication in mongo its working fine for few month then after that suddenly replication fails.I have started again with initial sync but during sync after a specific point ...
0
votes
1answer
27 views

How to confirm that chunk transfer is completed on a DB

I have one case where i create db for Daily data. I have some collections in this db which are sharded. My requirement is as follows: Create every day DB If There is a DB which is more than 7 days old ...
1
vote
0answers
138 views

Error to connect mongos when trying to create replicated sharded cluster

I'm trying to create an replicated sharded cluster in mongodb. Initially I've created two shards and there are a replica set with three members in each shard. And all the shards and replicasets run in ...
0
votes
1answer
41 views

MongoDB SSL Certs

I have built MongoDB with support for SSL and am wondering how it works with certs signed by a certificate authority? I have a wild card cert for the domain, so if I have mdb(1|2|3|4).domain.com and ...
0
votes
1answer
56 views

Can we have more than one arbiter in monogodb replica set

I am setting up cluster of my webserver which uses mongodb. I am doing replica set of mongodb.I have only two machines. So can I have two arbiters in replica set ?
0
votes
1answer
48 views

Is using a relational DB for storing votes and (accessed resources) overkill?

I am writing a forum component for a site and would like to keep track of what topics/questions a user accesses so that other topics/questions can be recommended based on said users previous choices. ...
1
vote
1answer
65 views

Setting stack-size ulimit for mongodb to reduce connection overhead

I am using MongDB 2.4.9 and working on performance tunung. With reference to the ulimit settings for mongodb, in my linux environment (ubuntu 12.04) the default setting for ulimit -s is 8192. MongoDB ...
0
votes
1answer
106 views

Heavy load of one of shards in MongoDB

I have a problem with one of our shards. For some reason I'm getting the next usage 15:38:42 up 4 days, 10:28, 1 user, load average: 3.67, 3.50, 3.56 In the mean time all other shards are ok. ...
1
vote
1answer
42 views

Partial access MongoDB databases without replication. Is that possible?

Is there any possibility to deploy a structure in case if when one or two mongod(s) in sharded cluster will be unavailable, so we'll be able to read and write partial results in\from remaining shards? ...
1
vote
1answer
52 views

Checking records consistency after mongorestore --noobjcheck

I had an HDD malfunction on a Mongo node. After running fsck and mongod --repair I was able to dump the needed collection with mongodump and move it to another server. However, some records appear ...
0
votes
1answer
112 views

MongoDB page faults even when all data is in resident in RAM

I have made a sample app that emulates what my real one does. It simply iterates over all documents of a specific collection over and over. I start mongo (as a windows service) and mongostat shows ...
1
vote
2answers
293 views

How to activate load balancer in sharded MongoDB

I have a very simple MongoDB database structure. Also I have 5 shards in it (3 of them are replicasets). But we testing DB loading and it seems that load balancing doesn't currently enabled. On mongos ...
0
votes
1answer
32 views

Is there any relation between BSON storage for mongoDB and MySQL storage?

I am working on an application where I need to make analysis that what will be the storage size of BSON structure if same data is stored which is stored in MySQL. Basically I am comparing MongoDB and ...
1
vote
1answer
136 views

MongoDB Shard - Disable Cursor timeout

I'm using an sharded-cluster(Mongo version 2.4.1) with a java application. After a specific time (10 minutes or more) I got the following exception: com.mongodb.MongoException$Network: Read operation ...
0
votes
0answers
31 views

Mongo - Fetch results sorted by the number of matching values in an array object

I have a mongo Database with collections such as : [{ _id : 'one', tags1 : ['A', 'B', 'C'], tags2 : ['D', 'E', 'F'] },{ _id : 'two', tags1 : ['A', 'Z'], tags2 : ['D', 'F', 'G', 'M'] } ...
2
votes
2answers
92 views

Is it always faster to create indexes after loading data?

I have a large number of records (~1 billion) that I need to load into MongoDB (actually TokuMX, but whatever). I have about 6 different indices I need to create on the collection. Is it always faster ...
0
votes
1answer
167 views

MongoDB: Manual failover and failback between two datacenters?

This is about MongoDB and datacenter failover and failback. We're thinking about using two datacenters and this MongoDB replica set: DC1-M1 prio 1, votes 1 (datacenter 1, member 1) DC1-M2 prio 1, ...
0
votes
1answer
26 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
72 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
88 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
58 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
75 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
185 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
152 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
102 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
64 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
111 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
49 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
62 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
252 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
166 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
131 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
73 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
28 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
506 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
46 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
351 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
527 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
42 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
65 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
50 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
230 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 ...
0
votes
1answer
317 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
121 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
125 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, ...