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

2
votes
1answer
170 views

mongodb distinct() in an array

In my mongodb database,there is only one document below: { "_id" : ObjectId("5226efc5ccf23796f9590f67"), "count" : NumberLong(126045), "eissn" : "1466-5034", "grade" : 0.0, ...
1
vote
1answer
140 views

mongosniff is missing in mongo package

I installed mongodb-10gen version 2.4.6 in Debian. This package does not include mongosniff. How can I install a pre-built version of mongosniff in Debian ?
0
votes
0answers
37 views

About transactions on mongodb

To what extent the atomic storage of mongodb can leave your database unsafe of inserts or updates on my data? In the other words. What are the possibilities of my data not been (inserted or updated) ...
0
votes
1answer
102 views

Scaling out mongodb on the same storage

We are planning to have some tests to predict how mongo db operates and functions with 2 terabyte of inforamtion on a single collection. So the plan is to have 15-20 sharded machines (on the same ...
0
votes
0answers
23 views

MongoDB fall into a forever waiting after a long time insert

I have a mongodb cluster,I have a very large size of data to insert to it .But it's a pitty that the insert operation seems to fall into a pause after a day's insert operation.I tried to connect to ...
0
votes
1answer
360 views

Connect to Mongo Shell on OpenShift

I have a gear running a instance of mongoDB. I wish to connect to the mongo shell. How can I do it? I have rhc and mongoDB installed on my computer. I have RockMongo on the gear, but I cannot create ...
0
votes
1answer
30 views

MongoDB Balancer:move data inside replication set or across replication set?

After reading the document of mongodb on the balancer topic , I have two questions: 1.If I set Balancer on , will the db operation efficiency will be influenced ? 2.Still ,I cannot understand ...
1
vote
1answer
86 views

Mongo db and sharding / replica sets concept questions

I have few questions about sharding and replica sets: I am planning to write important logs to a sharded environment. about 100 million rows in a day, If I will connect to a single MONGOS process , ...
1
vote
1answer
219 views

MONGODB primary became secondary after servers restart

I had this config before restart: { "_id" : "rs0", "version" : 5, "members" : [ { "_id" : 0, "host" : "Ubuntu12041vanilla:27017" }, { ...
0
votes
1answer
150 views

mongodb memory leak or big collection?

mongo 2.4.6 x64 RAM 24 GB With normal work memory consume around 10GB. After that we started read data from db (create archive raw data) memory consuming up to 90% of all memory trough 5day. And go ...
0
votes
1answer
143 views

Why is Mongo stuck in STARTUP2?

I have a Mongo replica set with a few secondaries. A box, which hosts a secondary instance, crashed and lost the database. I started the secondary Mongo instance again and now it's stuck in STARTUP2 ...
1
vote
1answer
249 views

GeoNear with Mongoose

This is my mongoose schema - var userDestinationSchema = mongoose.Schema({ uid: String, update_time: Date, location:{ //<INDEXED as 2d> ...
0
votes
1answer
96 views

Why does mongodb virtual memory get so large

I have just compiled MongoDB in my linuxOS and not insert any data into DB. The virtual memory is getting very large, about 40G. ps aux|grep mongod mongodb 176574 0.0 0.0 423784 39008 ...
0
votes
1answer
109 views

Which MongoDB administration UIs offer a table view (OS X)?

The only admin UI we found that offers a table view is MongoVue, which is only available on Windows. We're on Macs with OS X. Do any exist?
0
votes
1answer
148 views

What is lock pinger in mongodb

Can somebody explain me what is lock pinger in MongoDB [LockPinger] cluster XXXXXXX:27019 pinged successfully at Wed Feb 5 04:46:01 2014 by distributed lock pinger ...
0
votes
1answer
46 views

Find unauthenticated connections to MongoDB

I have many services and users that connect to MongoDB and now I need to switch on authentication. I have created some accounts and tried to ensure most users/services are now using accounts when ...
6
votes
1answer
4k views

MongoDB performance vs. PostgreSQL with 5.5 million rows / documents

Can someone help me compare these queries and explain why the PostgreSQL query executes in just under 2000ms and the MongoDB aggregate query takes almost 9000ms and sometimes as high as 130K ms? ...
1
vote
1answer
983 views

MongoVUE connect to mongodb with authencation failed!

I had a mongodb ,and a database named genbank ,genbank has a user whose role is "read" and "readAnyDatabase",it is very strange that I cannot connect genbank through this role by MongoVUE ,but I can ...
0
votes
1answer
98 views

mongodb equivlant query to this sql group by

I have a collection where most documents have an ISODate column. I'm wanting to get a basic count by date for that column. In MySQL if I had a datetime column on a table, to get what I'd want I'd do ...
0
votes
0answers
77 views

Issue while restarting - mongdb

I had tried to start the mongodb service using the following command in linux machine. service mongod restart I am getting the following error Stopping mongod: ...
0
votes
0answers
66 views

show database command doesn't show databases

I've made the following configuration options logpath=D:\mongodb\log\mongo.log logappend=true dbpath=D:\data\db directoryperdb=true port=64623 # [mo]ngodb maxConns=100 objcheck=true cpu=true # ...
0
votes
1answer
29 views

Line Comment in MongoDB config file

How to mark a line comment in mongodb configuration file? cpu=true #temporary for dev env Is this the right way? There is no clue about it in their website page about setting the configuration ...
1
vote
1answer
109 views

How to find MongoDB index statistics

Is there any way we can figure out what all indexes are cached into RAM ? I want to know page related stats for individual indexes (# of hits and miss )
-1
votes
2answers
827 views

How to convert SQL Server database file to MongoDB? [closed]

I have .mdf / .sdf files created in SQL Server. I want to convert them to MongoDB. How can I do this?
0
votes
0answers
64 views

Mongoose: Using limit operator with subdocs match a condition

I have a Schema like this in Mongoose: var Schema = require('mongoose').Schema; var ActivitySchema = new Schema({ is_hidden : { type: Boolean, required: true, default: false }, post : ...
0
votes
1answer
48 views

MongoDB replication to local hard drive

MonogDB's dynamic schema has made me thinking about replacing MySQL. I eventually want to use MongoDB as the default for all new app developments. But this project runs on only 1 dedicated server ...
0
votes
1answer
54 views

How can I find out if any cluster member is offline in mongodb cluster?

I have a mongodb cluster with 1 master machine(running mongos and config service) and 3 slave machines(used as data store).But now,I find that one of 3 machines (192.168.10.11) is down because I can ...
0
votes
1answer
36 views

Does disk errors on a mongo primary instance trigger election process?

On the MongoDB site here states that a elections occurs when primary becomes unavailable. What happens if there is a disk read/write error on the primary node? Does heartbeat check covers disk health, ...
1
vote
1answer
298 views

How to separate MongoDB journal

I'm trying to use NFS as db path for my MongoDB (which I read is not recommended, but a client demands it that way) and I'm having trouble separating the journal files. How would I do that? I've ...
0
votes
1answer
18 views

Updating Document in MongoDB without Alphabetically order

I am making one project on MongoDB and inserted some documents and now i am updating the documents by this code.. bson_init( query ); bson_append_string(query, "First", "A"); ...
1
vote
1answer
350 views

MongoDB Keys and casting between types

This is more of a theoretical question: Let's say I have a collection of documents, my_collection: { "_id": ObjectId("52c679ac7a23e6225b62c51f"), "date": ISODate("2014-01-06T03:48:30.737Z") ...
0
votes
1answer
52 views

why should use MongoDB [closed]

In which types of projects, MongoDB is the best suited? Can we use MongoDB in large applications? Why Open Source CMS and framework doesn't have support for MongoDB? How it is different than other ...
0
votes
3answers
427 views

MongoDB doesnt start normally?

I want to start mongo on terminal but it gives connection error like: MongoDB shell version: 2.4.5 connecting to: test Sat Jan 4 10:18:16.779 JavaScript execution failed: Error: couldn't connect to ...
1
vote
1answer
326 views

How does MongoDB store data in RAM?

I'm trying to sift through the remains of an event that was causing us a lot troubles. Aside from report to management about what happened, I'm trying to gain a much better understanding of how this ...
1
vote
0answers
42 views

mysql vs mongodb cache/load balancing

I have a system where users can 'like' content. There will likely be many hundreds of these likes going on at once. I'd like it to be AJAX driven so you get an immediate response. At the moment I ...
0
votes
0answers
23 views

Overwriting Files in MongoDB GridFS using C Driver

I am new to mongodb and read about the GridFS for storing Files but when i am storing Files in GridFS, I am facing two problems 1) When I am writing a file into GridFS using C Driver, havinge same ...
0
votes
1answer
68 views

High Global Lock % on Mongodb

I've just started using Mongodb v2.4.8 and the global lock % averages 80% which seems rather high to me. The CPU usage is around 120% on a 2 core, 2GB RAM, SSD VPS running Ubuntu 12.04 64bit. iotop ...
-1
votes
2answers
140 views

What database should I use to create a webmail service like gmail? [closed]

I planned to use python for my frontend with django framework. But for backend, I have no idea which database I should use. Since it involves plenty of reads and writes can someone point me in the ...
2
votes
2answers
167 views

Can I run a mongos without any config servers?

I just want to use mongos as a tool to scale up the number of connections I can open to mongo. So can I run the mongos without any config servers? Has any one done this before?
1
vote
1answer
70 views

How to manage users and collections in MongoDB? [duplicate]

Im triying to create users in a database in mongo, I want to lock the usage of te collections for some users, I'll give an example: Lets say that I actually have a db with 3 collections: Books, ...
1
vote
1answer
167 views

Should I save “document ID” as a String or Number in MongoDB

So I'm importing about a 100,000 documents into mondoDB. MongoDB already generates an Object hash but the data has a documentID that was used to identify records in the previous database. The IDs ...
1
vote
1answer
25 views

Permission error replica set

I'm having some trouble with intentionally removing a secondary from a replica set. I'm trying to simulate unexpected shutdown. My replica set consists of one primary and 2 secondaries. When I shut ...
1
vote
1answer
63 views

Start mongod instance on replica set as background job

I have setup a Mongodb replica set with 1 secondary node. When i execute on secondary sudo mongod --replSet rs0 --dbpath /data --port 27017 --oplogSize 700 The primary and secondary nodes are ...
0
votes
1answer
133 views

Where to insert data after sharding?

Actual database in localhost:30000 ------------- I used this as Shard1 another mongod in localhost:30001 ------------- Shard2 another mongod in localhost:30002 ------------- Shard3 ...
0
votes
1answer
126 views

Should I index before or after importing a dump?

I am using mongodb to persist a very big-size (90G), which has nearly 40,000,000 items. I read and parse this file and insert all items into mongodb (my programming language is perl, batch_insert, and ...
1
vote
1answer
47 views

Shard key selection for both write scaling and query isolation?

From the mongod documentation, I know that when choosing shard keys the key should always have high cardinality, so write operations are distributed to different shards (a kind of write scaling). But ...
0
votes
2answers
1k views

How to connect to MongoDB on Windows 8

I'm trying to get MongoDB installed and running on my new Windows 8 computer. However, I cannot seem to be able to connect to MongoDB when using the mongo.exe shell. I got the following error: ...
2
votes
1answer
346 views

verify that mongos server is connected to config servers

I've been writing a backup script for sharded replica-sets and it's almost done, except that I can't seem to get it to successfully start the balancer back up after everything's all said and done. ...
0
votes
0answers
86 views

Mongodb bson Query using C driver

I am doing a project in which i am saving BSON documents in a collection in the mongoDB server using C Driver. I am saving the collections like this bson_init( b ); bson_append_new_oid(b,"_id"); ...
0
votes
0answers
30 views

how to start sharding in mongodb

I am trying to learn sharding in MongoDb and here is my plan: I'm trying to shard the database S001 into 2 different machines. 192.xx.xx.60>mongod -configsvr --dbpath S001 ..Now running in ...