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
2answers
291 views

Is that possible to backup MongoDB sharded cluster without LVM or mongodump?

There is a "LVM-solution" in MongoDB documentation: http://docs.mongodb.org/manual/tutorial/backup-sharded-cluster-with-filesystem-snapshots/ Can I do the same thing, but without using LVM snapshots, ...
1
vote
1answer
172 views

Why MongoDB starts to split before 64MB

I'm testing the MongoDB Sharding with a Sharded Collection and a forloop to insert arround 1M documents to see how splitting and moving works. I'm surprise that after few documents MongoDB starts to ...
0
votes
0answers
710 views

Storing files in Mongo's GridFS vs File System

I read the question here: http://programmers.stackexchange.com/questions/150669/is-it-a-bad-practice-to-store-large-files-10-mb-in-a-database and this paper: ...
1
vote
0answers
388 views

Error with Solr DataImporter using Mongodb

I've configured my environment and I've downloading Solr 4.7 The idea is make an indexing my mongodb database. For this I've installed the mongo-connector like appear here: ...
0
votes
1answer
87 views

Mongodb crash after multiple query attempts

Every once in a while our mongo service crashes () after displaying log of multiple messages like this: Sun Apr 6 01:11:38.648 [conn2149] getmore prod_db.tweets query: { query: {}, $snapshot: true ...
1
vote
1answer
83 views

Selecting, filtering and aggregating in MongoDB

if we have two dataset 1-First dataset contains population data of cities in the United States of America. Each record in the dataset has the following format: { "city": "ACMAR", "loc": [ ...
1
vote
1answer
74 views

mongodb Date strings and other issues

I asked a question on Stackoverflow, and was told that my schema was way off. I am using mongodb to store whether or not a log file exists. The log file contains info for an hour. I'm not actually ...
1
vote
1answer
158 views

Database Design for NoSQL Fantasy Baseball League

I am trying to create a proper schema to place scraped data into, using a MongoDB database. Currently it looks like Team { id : id, name : String, teamLink : String, username : ...
0
votes
0answers
175 views

MongoDB Sharding and Replica Set Allocation

I am going to setup MongoDB cluster: 3 config servers, 3 routing servers, 2 shards (replica set per shard). A replica set is just simply 1 primary, 1 secondary and 1 arbiter. Therefore, in my ...
1
vote
1answer
121 views

Maintaining mongodb for a huge list of message “documents”?

Intro: I am working on an app right now for live messaging and it's almost complete. The database strategy is in order. So when a new message is created it is sent as an object fitting my mongoDB ...
1
vote
1answer
76 views

What synchronizes two delayed replicas, which is part of the replica set, included in sharded cluster?

Please take a look at my mongodb map at http://postimg.org/image/krzvmep4d/ What synchronizes two delayed replicas, which is part of the replica set, included in sharded cluster? How can I use my ...
0
votes
3answers
268 views

How MongoDB indexes differs from MySQL indexes?

I am a newbie to MongoDB. I know how Indexes works and what it's importance in MySQL. Are MongoDB indexes are the same as MySQL ?
3
votes
2answers
230 views

Running MongoDB and SQL Server on the same host- memory pressure

We have a new application that is making use of both traditional MS SQL and MongoDB for data storage. We're running both instances on the same Windows 2008R2 x64 machine, with 64GB RAM. There have ...
0
votes
0answers
386 views

MongoDB - Assertion failure error

I am using a replica set with three 2.4.4 mongod instances, and today the primary crashed. This happened several times, and I used repair command to repair the database each time. I think this error ...
0
votes
1answer
550 views

Query array of arrays in MongoDB [closed]

I have the following document in a mongodb collection which represents a Snort rule parsed with the perl Parse::Snort library: { "_id" : ObjectId("5328b974be4ed1400900000a"), "dst_port" : "6000", ...
1
vote
0answers
69 views

Script to query MongoDB with PHP [closed]

With Code Igniter and MySQL I do: $this->database->query('select * from table'); But I don't know how to use MongoDB. Can I still use this the same way to query MongoDB? ...
2
votes
1answer
285 views

Can arbiterOnly replica in MongoDB become SECONDARY and what it means?

The MongoDB documentation says that when a replica is added to the set as arbiterOnly=true it will not become Primary. But can Arbiter become a secondary and what does it when it does? I have a ...
2
votes
1answer
88 views

How do I add a user that has read access to only ONE database?

I have two databases admin and testdb ; Added a user Alice in the test database db.addUser( { user: "Alice",pwd: "Moon1234",roles: [ "readWrite" ] } ); But when I login using the user Alice, I can ...
0
votes
1answer
297 views

How can I Automate MongoDB schema design from existing MySQL Database and Logs?

I am working on the project which will automatically generate sample MongoDB schema analyzing existing MySQL database and logs. I am looking for help regarding the below questions. Please, share your ...
0
votes
1answer
1k views

Best Approach to storing chat history?

I'm building a chat application (Yes, another one :P) and am really curious about the best way to store a chat's history(String username, String Message, Time, and possibly string channel depending on ...
0
votes
0answers
417 views

Mongodb replica set : “errmsg” : “initial sync need a member to be primary or secondary to do our initial sync”,

I started primary and two secondary (which were previously running in master-slave config) in replica set on three machines with following commands mongod --replSet rs0 Then connected on one of ...
1
vote
1answer
210 views

MongoDB text index and text search

I have a mongodb collection db.articles,it has 2 keys ,"title" and "abstract".I want to do text search on these two keys.For example, the search text is "physics",and I want all the documents whose ...
0
votes
2answers
217 views

Mongodb ubuntu - config server and shard together

I have the following services on a single shard server: sudo mongod --dbpath /data/db/ --port 31001 sudo mongod --configsvr --dbpath /data/configdb/ --port 21001 The same server is using for shard ...
1
vote
1answer
994 views

How do I (safely) kill long running operations in MongoDB?

Occasionally operations get out of control in MongoDB and might end up running for hundreds of seconds, and impact performance until they are killed or completed. When that happens, I know I have ...
1
vote
1answer
2k views

How to create an efficient, scalable, multi-tenant data layer using MongoDB? [closed]

I'm working on the architecture for my upcoming Project Mangement app (as an example) and I'm seeking clarity on how best to design the MongoDB data layer, with specific regard to multi-tenancy. The ...
2
votes
1answer
503 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, ...
2
votes
1answer
264 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
49 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
117 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
33 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
721 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
40 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
105 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
478 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
376 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
580 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
478 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
357 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
235 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
292 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
70 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 ...
7
votes
1answer
6k 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
2k 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
158 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
209 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
109 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
33 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
142 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
2k 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
96 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 : ...