All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.

learn more… | top users | synonyms

2
votes
0answers
35 views

Sudden Mongodb high connections/queues, db completely freezes

We have a strange issue on our mongodb setup. This is a stand alone mongodb instance, it's operating on a dedicated machine, and it's queried by other machines. Sometimes we get peaks of high ...
0
votes
1answer
121 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
1answer
117 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 ...
2
votes
2answers
416 views

Limit the RAM memory usage in MongoDB

I am using MongoDB-2.6.1. Is there any way to limit the RAM memory usage? For example: Out of 4 GB RAM, let MongoDB use till 3 GB (<= 3 GB).
0
votes
0answers
14 views

on-premise MongoDB Ops Manager Slack integration

The feature request "Alerts: SlackChat integration for Group Alerts" is resolved. I use Ops Manager 2.0.1.332 (not Cloud Manager) and don't see the Slack integration. Slack is a cloud-based team ...
0
votes
1answer
639 views

Mongo Create a user as admin for any database raise an error

I am trying to create a simple user with the rights permission to access to any database and can do any actions. When I trying to execute the createUser command I got this error: db.createUser({ ...
3
votes
2answers
5k views

Mongo replicated shard member not able to recover, stuck in STARTUP2 mode

I have following setup for a sharded replica set in Amazon VPC: mongo1: 8G RAM Duo core (Primary) mongo2: 8G RAM Duo core (Secondary) mongo3: 4G RAM (Arbiter) Mongo1 is the primary ...
8
votes
0answers
1k views

Mongodb incremental backups

I was given the task to setup incremental backups for mongodb replicaset, as start point of course I googled about it and could not find anything on mongodb docs, I did find however this question ...
1
vote
1answer
26 views

MongoDB GridFS Offsite Backups

We are using MongoDB GridFS to create a document archive. I am creating a sharded cluster at our Primary DataCenter. I need a working backup at our offsite Disaster Recovery DataCenter. This will ...
0
votes
0answers
14 views

MongoDB aggregate() error in server

I have two queries, the first one shows 'not master and slaveOk=false' error and second one works fine in the server. We have two MongoDB replica sets.Can anybody explain why the queries behave so? ...
0
votes
1answer
1k views

Date range query for past 24 hour in Mongo shell

I am setting a cron job to collect results from MongoDB database profiler. I'd like to collect results within a 24 hrs period. I plan to run mongo command with javascript. Question is, in Mongo ...
1
vote
1answer
64 views

How can I create a MongoDB based on MySQL schema?

How can I create a MongoDB based on MySQL schema? This is my schema: productCode VARCHAR(15) productName VARCHAR(70) productLine VARCHAR(50) productScale VARCHAR(10) productVendor VARCHAR(50) ...
0
votes
0answers
10 views

MongoDB too many db.eval cause my DB can't read write

I am using C# Web API with mongocsharpdriver 1.9.2 and MongoDB 2.6.9 In my case I need performance that have to use db.eval to execute JavaScript on the server side. But I got a problem that too ...
1
vote
0answers
11 views

How to Shard a Mongodb Collection based on String and Date Time Shard Key using Range Based Sharding

I am new to Mongodb,I have to Shard a Collection Based on Integer, String and Date time shard key, I am able to shard a collection using integer shard key. below is the command,I am using for Range ...
0
votes
1answer
20 views

Database for live mobile tracking [closed]

I'm developing an app that allows to track a mobile device instantly (live) ... I need an of advice. The application must send the location to a webservice that in it's turn records the received ...
1
vote
1answer
182 views

While installing Mongodb, getting “enabling http interface” message and stopped

I am getting following error while installing mongodb, $ mongod --directoryperdb --dbpath C:/mongodb/data/db --logpath c:/mongodb/log/ >mongodb.log --logappend --rest 2015-03-17T17:32:55.359+0530 ...
0
votes
1answer
212 views

How to access the data of collections from the .ns and other core storage files in mongodb?

My database in MongoDB was not accessible after the journal file became of the size > 1 GB . So I restarted the mongod process with a different data path to store the mongodb files in my machine. Now ...
0
votes
1answer
536 views

Long running query on replica worker set in mongo

Hi I updated my mongo version from 2.4.to 2.6. Now when i see current op in mongos it shows me some queries which are running for long long time. one example is { "opid" : ...
0
votes
2answers
15 views

how to set mogodb in upstart service with authentication in mongodb way

I set username and password in MongoDB every time I have to run this command in terminal: sudo mongod --auth --port 27017 --dbpath /var/lib/mongodb As soon as I close terminal, MongoDB db also ...
3
votes
1answer
39 views

How do I know that I am connected to a config server

I need a simple check for identifying that I am connected to a MongoDB config server. I can check the process to differentiate between mongod and mongos: > db.serverStatus().process; mongod Now ...
0
votes
0answers
22 views

Can mongodb disable in-memory? force fully-in-disk

up vote 0 down vote favorite I'm using mongodb to store massive data, but memory limit to 2G. So I want to mongodb fully-in-disk (the best way is set some collection fully-in-disk) Is there a way to ...
0
votes
2answers
420 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 ...
2
votes
1answer
16 views

Single Slave with Multiple Masters. Does this pattern exist in MongoDB?

Can we have a single mongoDB remotely (online) which can act as a slave to multiple master mongoDBs (which operate offline)? For example, I have huge number of transactions which I like to perform on ...
1
vote
1answer
121 views

How to update a whole document in MongoDB using PHP?

I want to update my older entries through the PHP interface in MongoDB. First, I get data from the text fields and then store that into variables. Then I use those variables to update data in Mongodb. ...
1
vote
1answer
123 views

MongoDB: movechunk failed after adding a new share to cluster

I have a MongoDB cluster version 2.6.8, which already has two shares: share1 and share2. When I add a new share3 to the cluster, data chunk can't migrate to share3. This is from the mongos log: ...
4
votes
1answer
56 views

Should images be separated from posts in MongoDb?

I am working on a project with Meteor.js and I am using CollectionFS with GridFS to easily store images in MongoDb. Now I am not the best with databases and database design, but I heard that in nosql ...
2
votes
1answer
46 views

How unique are MongoDB _id fields?

I am trying to create a schema for documents and collections for a MongoDB database I am creating. I have read a few documents describing the _id field that is generated by each document upon ...
0
votes
1answer
28 views

Scrapy data analyzed with R, mongoDB or other pipeline? [closed]

I'm scraping data using the Scrapy library in python and i'm planning to make few analysis in the future using R. In the future it could be a very big database with millions of items, what are the ...
8
votes
2answers
3k views

check storage engine from shell

I'm upgrading to 3.0 and ran into some issues with the upgrade. Specifically, I got an error when trying to start up mongod via ssh, it tried to use the default dbpath instead of the one i specified ...
1
vote
0answers
48 views

MongoDB replicaSet keep 'syncing to' and only can be connect with shell

Hi I am new with MongoDB 2.6 Replica Set I have three DB service in Docker and DB work in Replica Set It works great I can connect to DB Read,Write in C#,MongoVUE but I didn't know why my db will ...
1
vote
0answers
15 views

Security: direct remote access vs webinterface

I need to remotely connect to my (mongoDB) database and I currently allow direct access to the DB server port with user/pw login. I often read that this is generally a bad idea and that one should ...
1
vote
2answers
23 views

MongoDB Replica Set Failure

Some background I had an issue with my replica set the last 24 hours, where the members could not connect to each other, and I got errors such as; could not connect to .... the machine actively ...
1
vote
1answer
400 views

MongoDB can't add new replica set member [rsSync] SEVERE: Got signal: 6

I have a replica set and I added a new member to the set. The initialSync begins for the new member and rs.status (on primary) shows STARTUP2 as status. However, after a long enough time, there's a ...
0
votes
1answer
917 views

MongoDB Replica Set Can't be connected To

I just set up a replica set for a standalone Mongo instance using the following changes to my config and rs.initiate(). # in master/slave replicated mongo databases, specify here whether # this is a ...
1
vote
1answer
171 views

Choosing shard key with compound index field

I have a compound key with field articleId_1_host_1_timeStamp_1_isIndia_1_location_1. Cardinality of fields is articleId has 20000 different value host has 17 value timestamp is increasing field ...
0
votes
1answer
307 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 ...
0
votes
1answer
179 views

Use index intersection feature in mongo 2.6 to compound shard key

I am having three indexes like name,age,salary. I can use them as compound index as per 2.6 (name and age together). But can i use the same indexes as compound shard key like name and age. i also have ...
0
votes
1answer
22 views

Move data from 4 shard, replicated mongodb cluster to a single server without downtime

I need to move sharded data from four replica sets to a single remote machine without downtime. Can you describe the process step by step?
1
vote
1answer
460 views

Choosing shard key and friendly URL Ids for my MongoDB

I have decided to use MongoDB as my Database for a web application. However, I have some difficulties to get started and I hope that you can help me out with a few questions. I am developing my ...
0
votes
0answers
32 views

mongodump monitoring (with exit codes)

This is how we monitor backups with mongodump. Exit code and mail if not 0. Mailing is reliable in our environment. mongodump -h $RANDOM_SECONDARY -u $BACKUP_USER -p $BACKUP_PASSWD --out ...
1
vote
0answers
14 views

MongoDB replCallbackWithGlobalLock-0. What does it mean?

I have a production replica set with 3 members (primary, secondary, arbiter). Almost every day, there's a short downtime where the primary is demoted to secondary for no apparent reason. The replica ...
1
vote
1answer
888 views

MongoDB all replica set members are “OTHER”?

I am setting up a MongoDB replica set using EC2's image: https://aws.amazon.com/marketplace/pp/B00CO7AVMY/ref=dtl_recsim_B007IBMJPI_B00CO7AVMY_3 MongoDB version 2.6.5 I have managed to set up ...
1
vote
1answer
610 views

How to update a field in sharded environment in mongodb using C# driver

I have successfully done loading in sharded environment. It is working fine. But when I do update in sharded environment, I am getting the error as : WriteConcern detected an error 'update { q: { ...
2
votes
1answer
35 views

Backup on both secondaries or a dedicated backup secondary

In my current replica set setup, I have a a primary and 2 secondaries (both a normal secondaries - priority 1 on each, no delay, no hidden). Note that reads and writes are only against the primary. ...
-1
votes
0answers
41 views

insert performance of Mysql InnoDB vs Mongodb

I often heared that Mongodb has a better performance than mysql while mysql has more consistence than Mongodb. Then I did a experiment using the following python code based on MySQL-python and ...
-1
votes
0answers
32 views

how to read form mongodb secondary in replica set?

I am try to connect using below code but my nodejs api does not read from secondary member in replica set. module.exports = { MONGO_URI: process.env.MONGO_URI ...
0
votes
1answer
1k views

cannot log in to mongo from command line - using MongoDB 3.0 and WiredTiger - I've followed all instructions

NOTE: I have tried not setting bind_ip and also setting it to 0.0.0.0 -- neither one fixed my issue. This is my mongod.conf file: systemLog: destination: file path: "/root/mongodb.log" ...
1
vote
1answer
313 views

WiredTiger - “too many open files error” during resync of a secondary replica set member

I'm upgrading a secondary replica set member to wiredTiger. I have upgraded it from MongoDB 2.6.3 to 3.0.4 and changed the storage engine to wiredTiger. Now it is resyncing all data from the primary. ...
4
votes
1answer
412 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
1answer
129 views

How to read a bson file using C#

I have a bson file dumped by mongodump command. How can I read the content of this file to memory with C#?? I don't want to use the mongorestore command.