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
0answers
27 views

what model should i use for store detections time series in mongodb?

i have cloud site with many hosts and virtual machines inside of it. I receive from some software many different metrics values regarding vms usage (cpu load,free ram,energy consumption and so on). ...
0
votes
1answer
64 views

MongoDB Hashed Shard Keys Selection

I have a DB which holds very simple documents called "Item": {_id:<ObjectId>, playerId:int, isRead:bool, content:string} containing about 80M documents. Each Item belongs to a certain player, ...
0
votes
0answers
35 views

Data containing list of all the domain names. MongoDB or MySQL?

Data containing list of all the domain names (currently present in the Internet world), along with few attributes (5-6 or maybe 10, each attribute being a column) will be considered as Big Data? ...
1
vote
2answers
107 views

MongoDB Disk Usage with Capped Collections

I am using MongoDB using C#. I am currently using only a single server. Since I have to create Table events for MongoDB collections I have created a single replica set(primary). And using ...
0
votes
1answer
15 views

what is default balancing window in MongoDB

I have read about balancing window in MongoDB document. I see mongo tell about how to modify balancing window but I don't see the default of balancing window. I see only one document about chunk size ...
0
votes
0answers
45 views

Using MongoDB with circular object references

Please forgive me from the beginning. I am brand new to document oriented databases and I am sure that I will need guidance to reform the question in order to get answers. I am looking to use MongoDB ...
1
vote
0answers
33 views

why my data is not being sharded?

I am using mongo 2.6.7 I deploy a sharding cluster follow the guide: http://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/ My sharding cluster include: - two replica sets (one primary + one ...
0
votes
1answer
82 views

How to get all documents from a particular chunks in MongoDB?

From mongos log, I got the following message balancer move failed: { chunkTooBig: true, estimatedChunkSize: 408839903, ok: 0.0, errmsg: "chunk too big to move" } from: shard4 to: shard1 I know ...
0
votes
0answers
41 views

Mongo Memory mapping file size issue

I am witnessing some performance issues in my Mongo Sharded cluster. I checked the serverStatus for the memory uses on my shards This is the output Shard one Primary RAM size 512 GB "mem" : { ...
0
votes
0answers
43 views

MongoDB GridFS delete operation too slow while mongod process takes up 100% CPU

I'm using Python (CPython 2.7.3 on Debian 7.8 amd64) with pymongo driver (version 2.7.2) to connect to a MongoDB (db version v2.4.12) database which has solely been used to store files in a GridFS ...
1
vote
1answer
52 views

Setup MongoDB replica servers with different power?

Is it a good practice to setup replicas with the same machine size (wrt. CPUs, RAM, Bandwidth, etc.) or can replicas be based on smaller machines? One usecase might be to have a small non-voting ...
0
votes
1answer
87 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
38 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
169 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
66 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
267 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
19 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
35 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
3answers
424 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
30 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
72 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
760 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 ...
1
vote
1answer
60 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
304 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
74 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
87 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
34 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
150 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
96 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
51 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
91 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
203 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" ...
1
vote
1answer
534 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
0answers
21 views

after “mongod --remove” in Windows and then lost the databases

I removed MongoDB from the Windows Service by "mongod --remove" in command line and succeeded. After creating a new mongodb service with the same dbpath and "mongod --repair", I couldn't get the ...
1
vote
1answer
366 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: ...
2
votes
1answer
230 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
62 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
120 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
84 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
57 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
2answers
138 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
88 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 ...
3
votes
1answer
216 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
74 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
324 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 ...
1
vote
1answer
95 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
26 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
51 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
164 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
46 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", ...