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
49 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
62 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
37 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
392 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
425 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
53 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
588 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
375 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
26 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
73 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
147 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
193 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
76 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
194 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
26 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
66 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
163 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
140 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
50 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 ...
1
vote
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
423 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
96 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 ...
0
votes
2answers
35 views

Can sharding work with replication?

Basically we need to have a replication, a minimal setup. Primary - Slave 1 - Slave 2 Is it possible in the future we Shared it? What would be the setup? Is it going to have shared on Slaves like ...
1
vote
1answer
170 views

Shard keys must all be ascending?

I have a collection that I've been trying to shard, but I can't get it to shard with the index that I gave it. The collection in question uses a hashed index, which I created using: ...
1
vote
1answer
64 views

MySQL geospatial query optimisation suggestions

I am new to DB Administration. Trying to sort out this query which is the heart of our application. I am searching google on similar questions, but would like an experts opinion on my particular ...
0
votes
1answer
190 views

exception: hosts cannot switch between localhost and hostname

I created a replication set. I added localhost in the set in the beginning, but when I try to edit the member with the actual hostname. I get error "exception: hosts cannot switch between localhost ...
1
vote
1answer
109 views

Set replica set member host names on Secondary

I have a replica set rset1 that consists of a primary, secondary, and a backup server. I recently just changed their DNS names in Route53--the only name that didn't change was the Primary's, ...
0
votes
1answer
141 views

Would you use MongoDB in high-transaction environment? [closed]

using other words: does the one-write-lock-per-database policy (it's not a "bug" but a "feature" by design) affect contention making its usage in certain kind of workloads less then optimal? if not ...
3
votes
1answer
88 views

Mongodb restrict access on collections level

I'm building a backend system using MongoDB. Now I want to restrict access on certain numbers of database collections to this system. For example I have users, admin_users, pageviews and I want this ...
0
votes
1answer
62 views

mongodb on-premise: will it work?

We are planning to package MongoDB-PostgreSQL hybrid solution in our application that will be deployed on customer site on-premise. It will be packaged as a software virtual appliance. Our reason for ...
2
votes
1answer
364 views

How much free space do I need for mongoDB? and how to reclaim lost space?

I ran out of disk space on my mongo database. I saw it and dropped some collections (120 out of 1700 i had). And ran db.compact(...) thinking it would release free space. well, that was a stupid idea. ...
0
votes
0answers
88 views

How much free space do I need for mongoDB? and how to reclaim lost space?

I ran out of disk space on my mongo database. I saw it and dropped some collections (120 out of 1700 i had). And ran db.compact(...) thinking it would release free space. well, that was a stupid idea. ...
0
votes
1answer
160 views

Data Analysis with MongoDB or MySQL

I have a need for processing some data in order to come up with some statistic. This is the scenario: Each user can answer several questions from the question list. They pick their answers from a ...
1
vote
1answer
165 views

How to setup a MongoDB replica set for the connector

I want to keep MongoDB and Solr in sync. The mongodb-connector (python) is the tool I want to use to do that. Now a replica set in mongodb is required (see ReadMe), but I don't want (and can) setup a ...
0
votes
1answer
52 views

CRC checkup in MongoDB

I am new to MongoDB and currently working on a project. I read tutorials but I'm unable to find any information about Cyclic Redundancy Check (CRC) in MongoDB. Is there any way to check that the data ...
0
votes
2answers
261 views

How secure is mongodb with elastic beanstalk and EC2

I have a questions. I run MongoDB on one of instances of EC2 and application on Elastic BeansTalk. I restricted access to DB: only application can access it. DB instance has Elastic IP because it is ...
0
votes
3answers
824 views

Difference between Sharding And Replication on MongoDB

I am just confuse about the Sharding and Replication that how they works..According to Definition Replication: A replica set in MongoDB is a group of mongod processes that maintain the same data ...
0
votes
2answers
114 views

Running a simple logging program, how to diagnose spikes mongod's CPU activity?

I'm running mongodb 1.4.7 - I've a node server set up which logs incoming requests in a logs collection: {'u':'user123', 'l':'log data'} In addition, once the request happens, the server will check ...
0
votes
1answer
34 views

Replicating MongoDB server on windows

I have a main server(windows-27017) and on that i replicated my data on different port (37017) but same server. Now i am trying to add my notebook as a replicate server on mongodb and installed ...
0
votes
1answer
120 views

MongoDB Storage Architecture (MySQL innodb_file_per_table equivalent to MongoDB)

I am new to MongoDB.I looked inside dbpath I found users.0 - 16.8MB users.1 - 33.6MB users.ns - 16.8MB Further when I dig deeper I found, The .0, .1 files are datafiles. Each datafile is ...
3
votes
2answers
702 views

How to Determine Chunk Distribution (data and number of docs) in a Sharded MongoDB Cluster?

Having done all the right things - picked an appropriate shard key, scaled horizontally, distributed my data across several shards, I find I now have no real way to determine how well balanced the ...
0
votes
1answer
180 views

MongoDB shell version error (Server has startup warnings)

I installed MongoDB under Ubuntu server and when inter to MongoDB shell i got this error and warnings. MongoDB shell version: 2.4.7 connecting to: test Server has startup warnings: Sun Oct 27 ...
2
votes
1answer
116 views

Improving concurrency in MongoDB via sharding

Our current setup: Cluster of ~500 ec2 c1.xLarge worker nodes with 8 threads on each running scientific simulations Results temporarily stored at runtime on each worker node's local MongoDB, using ...
1
vote
1answer
410 views

“ERROR: could not read from config file” MongoDB

I'm trying to configure MongoDB in OS X Mountain Lion. I've installed with Homebrew; I have followed lots of tutorials, but I have got an issue which I haven't been able to solved. The issue is about ...
0
votes
1answer
215 views

Launchctl in MongoDB

I'm trying to configure MongoDB in OS X Mountain Lion. I've installed with Homebrew; I have followed lots of tutorials, but I have got an issue which I haven't been able to solved. The issue is ...
0
votes
0answers
378 views

Installing mongodb as service

I'm trying to install mongodb as service on a machine running Windows Server 2008R2. I'm getting this message in the command prompt: The service is not responding to the control function. More ...
0
votes
2answers
307 views

Diffrence between relational and unrelational database [closed]

What is the difference between relational(MySql) and unrelational database(MongoDb)