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
25 views

Converting sql into mongodb nosql

I am trying to convert oracle sql into its mongodb equivalent version. create table my_hll as select mod(ora_hash(n), 1024) bucket, max(num_zeroes(trunc(ora_hash(n)/1024)))+1 val from previous_data ...
0
votes
0answers
19 views

What exactly should I backup in MongoDB when using replica sets?

I have several instances of MongoDB replica set servers with a primary and a failover machine for each replica set. The primary machine makes daily backups by creating an LVM snapshot and copying all ...
0
votes
1answer
22 views

Is there any way to change the size of preallocate data file in mongodb?

In mongodb data files are preallocates to a particular size,like first data file .0, the next .1, etc. The first file mongod allocates is 64 megabytes, the next 128 megabytes, and so on, up to 2 ...
1
vote
1answer
30 views

mongo: how should I layout my data

I have 2TB of data currently spread across many CSV files that looks like: { 'rec_date': "2010-01-29", 'rec_time': "09:15:00", 'site_no': '46', 'data_owner': '1', 'flow_period': '5', ...
0
votes
1answer
12 views

Failing to automatically re-connect to New PRIMARY after a replica set failover , from Mongoose (MongoDB, NodeJS Driver)

I made a simple NodeJS App, with Mongoose as MongoDB Driver. And connected to a mongodb replica set. The App is working fine until I shut down the current primary, When the PRIMARY is down, the ...
0
votes
1answer
15 views

Are my MongoDB servers right in setting?

I have a small web site, so I used two servers. A: master 4G Ram, 96G SSD B: slave 2G RAM, 96G SSD The B server is always for backup, no read, no write. In my application, many users can (and will) ...
0
votes
0answers
24 views

Structured and Unstructured Data. Do I need NoSQL? [closed]

We're building an auto-generated model of a large enterprise. The model collects log files, config files, source code, and in some cases, network traffic, so we have a data collection requirement ...
0
votes
0answers
24 views

Issue with total count in sharded collection

I am having a collection which is sharded. This collection receives data from a script which is running hourly. On this data we do some aggregation. My issue when we insert data in collection and run ...
0
votes
2answers
57 views

Database structure for hierarchical quiz?

I'm doing a personal project where I have a quiz with a number of boolean questions. Each question will have a two answer choices "true" and "false". Based on the selected answer, a new question will ...
0
votes
0answers
15 views

Config data base showing invalid date for collection modification sharding is stopped

For last few days my sharding is not working and every day i am seeing very slow writes. I tried to drop some existing data to create space. But while dropping some old data i got error and when i ...
0
votes
0answers
19 views

Repeat statement of ChunkManager: time to load chunks for empty

In my one of the MongoS server i am continuously getting the below chunkManager statement ChunkManager : time to load chunks for empty This is repeating in logs and the day it started insert in my ...
0
votes
2answers
49 views

Unable to start Mongodb. Appears to be crashed, if yes, how to recover my data

Below is the error when ouput when I am trying to start my local mongodb. I am unable to start it and after little exploration, I doubt my local db has been crashed. If yes, is there a way to recover ...
0
votes
1answer
24 views

mongoexport on 2.0.4

What I'm I missing here? I need data greater that ISODate("2015-01-11T00:39:40.121Z") I know many forums have different answers for the same issue. But non resolved. Need a different point of view ...
0
votes
0answers
40 views

Can not drop db in sharded environment

I am trying to delete some old dbs in my sharded set up. Step i am taking are : Stop Balancer. Drop Db Start balancer But in some of the DBs i am getting these errors. "errmsg" : "exception: ...
0
votes
0answers
27 views

Old Mongos servers are found in config database mongo

For some time we are facing issue with our sharded set up as some times one collection randomly stuck on one shard. I have daily db (we create daily database with date) in my application where some ...
0
votes
2answers
44 views

Hierarchical data in MongoDB?

I have a question regarding Hierarchical data. Our app shows posts, that are structured inside parents. Here's how it goes: prof->sprof->subject->post (Each prof can contain multiple ...
0
votes
0answers
29 views

Mongodb replication behind a gateway

I have a replicaset with 3 servers and I need to move two if them behind a gateway. The final setup would look something like this, Server 1 (PRIMARY) ________ | S | _____________ | _ _ _ _ _ _ _ ...
0
votes
0answers
21 views

Socket recv() timeout on slave node

Now I installed Mongodb 2.6.4 as master node. On another node I installed same version as slave node. I configure "only=xxx" parameter to sync xxx database. When I start up slave node.I get following ...
2
votes
1answer
38 views

MongoDB - real disk usage is LOWER than dbStats.storageFile

I'm a bit surprised by what I observe in my mongo server, so I would like to know if anybody understand how this is possible. I have one collection of around 15K documents. For each of them, I store ...
0
votes
0answers
30 views

Mongodb instances and oplog

I would like to ask a couple of things about mongodb and replica sets: I have different meteor applications running on my private server; each one of them uses a different meteor database (and does ...
0
votes
0answers
35 views

Mongo Chunk 250000 document limit is creating problem in chunk migration

We can set chunk size limit for a DB. But chunk has a limit of 250000 documents per chunk. My chunk size is 250 MB which varies the number of document in each collections. So normally some of my ...
0
votes
0answers
29 views

Why mongod said “note: noprealloc may hurt performance in many applications”?

I just start mongod with config file: mongod -f /etc/mongod.conf In /etc/mongod.conf, I set storage.preallocDataFiles=true This is a part of config: storage: dbPath: "/data/db" ...
0
votes
1answer
21 views

How to add setParameter in mongod config?

When I am using setParameter in mongod config, I start mongod with error: Unrecognized option: setParameter = enableLocalhostAuthBypass=1 How can I use setParameter from config file ? P/S: I am ...
0
votes
1answer
51 views

Mongo db sharded “the collection's metadata lock is taken” issue coming very frequently

I am seeing this warning in mongoS log consistently for one collection. [conn96] warning: splitChunk failed - cmd: { splitChunk: "ibeat20150105.dgrpCount", keyPattern: { articleId: 1, host: 1 }, min: ...
1
vote
1answer
100 views

Chunk Size is shown as 1 KB in mongo db logs even it is set to 300 MB

I am running a mongo cluster. Chunk size set is 300 MB but for today morning it is showing me in logs taht chunk size is 1024 Byte. I checked in current op there also it is showing chunks of 1024 ...
1
vote
2answers
32 views

Separate login for user / administrators using mongodb

I have 2 separate groups of users on my website. One is user and the other one is admin. Currently I put them in 2 different collections user and admin and login respectively. My questions is: ...
1
vote
0answers
34 views

How I can create user defined roles

I have a database in mongoDB 2.6.4 in which I want to restrict the users as per their level. I want to give read privileges to some users and insert/update privileges to some other users on a ...
0
votes
1answer
31 views

MongoDB replica index filled hard drive stuck in fatal

I have a 3 server replica set deployed by Googles 1 Click Deploy functionality, the problem is I created an index on a particularly large collection (100,000,000 documents) and it consumed the whole ...
1
vote
0answers
38 views

Nosql multiple database design to handle sharing scenarios

This question is regarding design of a database in mongodb. The scenario: A user has a drive which he can share with others. Drive has two categories: docs and others. The user has three choices in ...
1
vote
1answer
26 views

Help - Error : Could not connect to master of shard replica set

I have a shard, using mongo v2.4.11. It has to mongos, 3 config, and 8 replica set (2 replica for each set, means 16 node for shard) It is keep having exception as per below. Caused by: ...
1
vote
1answer
18 views

How to use fsyncLock() safely in backing up a single mongod

I read from mongodb document: important: db.fsyncLock() may block reads, including those necessary to verify authentication warning: When calling db.fsyncLock(), ensure that the connection is kept ...
2
votes
1answer
46 views

mongoexport not exporting all possible data

I have a collection with documents similar to the following: { _id: 'p_123456', id: 123456, kind: 'person' data: [...] } id field can contain either positive or negative integers. This ...
0
votes
0answers
28 views

An efficient way to do “reverse queries” in MongoDB for an expert system?

I am working on an "expert system" in which I would like to perform "reverse queries", that is I want to store queries and find queries that match a given object. For example, if I have an object ...
0
votes
1answer
58 views

I can not copy database MongoDB

I created a mongo cluster in ubuntu and run the copy in the sharding with a small database, everything works fine. The problem is that when I try to copy a database 300gb, is not getting done. The ...
0
votes
1answer
17 views

Mongodb: Possible to enlarge a capped collection?

If a collection is created as capped, is it possible to increase the cap without losing data? Or to increase the cap without recreating the whole collection? Thanks
0
votes
1answer
20 views

Mongodb: Does the stats command show me the capped size setting?

I am looking around my mongo instance. One of the collections was created as capped: db.createCollection("userObjects", { capped:true, size:400000000000 }) But when I look at the ...
0
votes
1answer
28 views

MongoDB Sharding : What should be the Sharding key if we want to find records with more than one field

I am having collection ("links") with listed fields: collection-name: "links" 1) url 2) title 3) score 4) description 5) ratings (embedded_many) and having index on "url", "title", "score" because ...
1
vote
2answers
27 views

Mongodb: Does not seem to respect capped size limit

Running mongodb on win2012 Mongo db version v2.6.4 Our collection is created with this param: capped:true, size:500000000000 // 500 gb But the data dir, that only holds this one collection, has ...
0
votes
1answer
30 views

I cannot do anything on replSet when auth is enabled

I have a mongodb cluster with one replSet, 3 config servers, and 2 mongos instances. I logged into mongos using (admin, pwd). admin is given ["userAdminAnyDatabase", "dbAdminAnyDatabase", ...
0
votes
0answers
19 views

can we avoid the database disk size increases as a multiple of the CSV file in mongoimport?

I am using mongodb-linux-x86_64-2.6.6 and importing data from csv files of size more than 1GB (and have 15 files) using mongoimport. After importing near 20GB data it goes out of space on my system ...
1
vote
0answers
38 views

MongoDb Volume alert so much iops(>10000)

I am new for MongoDB. I have setup mongodb for my production server. I have setup alert in aws ec2 instance for iops and it gives me alert every 15 minutes that iops reached at > 10000. I am not ...
0
votes
0answers
13 views

can we avoid the database disk size increases as a multiple of the CSV file in mongoimport?

I am importing data from csv files of size more than 1GB (and have 15 files) using mongoimport. After importing near 20GB data it goes out of space on my system which has 250GB hard disk. I go through ...
0
votes
1answer
21 views

How to know what server and port to select in MongoVue

I am unsure about which server and port to select when trying to start up MongoVue. FYI, MongoVue is the windows GUI for using mongodb (for those macusers who may want to answer this question). I have ...
0
votes
0answers
30 views

Can i run both Redis and MongoDB l on same VPS?

My website about learning new vocabulary, and the operations which most use on website is load a new vocabulary in database, then write some parameter to that words. So i decided my database need ...
1
vote
1answer
33 views

Limit the RAM memory usage in MongoDB

I am using MongoDB-2.6.1. The question from me is that- "Is there any way to limit the RAM memory usage??" Fr example: Out of 4 GB RAM, let MongoDB use till 3 GB (<= 3 GB). Please help me out.. ...
2
votes
1answer
33 views

Mongodump on Replica Set

Running backups on a Mongo Replica set - 1 primary, 1 secondary, 1 arbitrar. Had a instance where all three stopped talking to one another and all went to secondary. I ran a backup against the the ...
3
votes
1answer
66 views

3 Node Replica Set all became SECONDARY

my 3 set replica set all became secondary and I'm not sure why. db1 2014-12-12T02:43:55.067+0000 [conn1413096] end connection 10.0.64.12:58483 (512 connections now open) 2014-12-12T02:43:55.067+0000 ...
1
vote
1answer
46 views

MongoDB Stuck with Jumbo chunks while exhausting a shard

I'm running a shared MongoDB 2.4 cluster. I'm currently in a process of exhausting a shard and I'm down to the last 15 chunks needs to be migrated out of 9660. My issue is that these chunks are too ...
1
vote
1answer
27 views

Mongodb: too many namespaces raise on setProfiling

I have a mongodb database with a single (relatively big, around 130GB) collection, with 3 indexes, on which I'd like to do some profiling. However when I run the db.setProfilinStatus(1, 1000) command, ...
0
votes
1answer
30 views

Update an array element with inc mongo update

HI All I have this Data in mongo, {"articleId" : [ { "articleId" : "9514666", "articleCount" : 1 } ], "count" : NumberLong(1), ...