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

learn more… | top users | synonyms

0
votes
1answer
12 views

Make MongoDB close open files

I am currently trialing numerous database designs (to solve this problem: Large (>22 trillion items) geospatial dataset with rapid (<1s) read query performance), and my latest design in Mongo ...
1
vote
1answer
205 views

MongoDB “overacts” on cleaning/flushing and finally hangs up

Recently I run several times into trouble with mongodb that exhausted my system. The database is tiny, after a mongodump, all files together weight 248KB. After some hours uptime it happens that the ...
0
votes
0answers
10 views

MongoDB HA by reading from Last Secondary not working

Our topology is (1 MongoDB server at each location) Primary Datacenter (main server, priority 10 ) DR datacenter (active standby, priority 5) On-Prem datacenter ( When shiz hits the fan, priority .5)...
1
vote
1answer
2k 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({ user:...
0
votes
0answers
8 views

Strict mode not working mongo Shell

I was test in process of testing the strict mode of mongo shell queries. This the link i am referring. Sample document looks like - { "_id" : ObjectId("19876"), "ip" : "127.0.0.1", "...
1
vote
1answer
159 views

How to efficiently design MongoDB database for Uber-like application?

I'm designing a MongoDB database for an Uber-like application, but since I'm new to NoSQL concept, I have several doubts. I have three main collections - users, requests and messages. User can post a ...
0
votes
1answer
282 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
7k 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 shell,...
1
vote
0answers
12 views

Replication prioroty

I have two MongoDB instances running on two servers (instance1 and instance2) and they are configured as a replica set. Instance1 is the primary and instance2 is the secondary. When instance1 was ...
0
votes
1answer
224 views

Client not reading from Mongo secondary database

I've implemented a replica set that I'm using globally. I have my master in Oregon, US and 4 secondaries. California and Virginia, Frankfurt and Sydney. I also have web servers in those same regions ...
0
votes
0answers
13 views

Design: Available domain database

I'm building website and service that will allow user to check if given domain is available. Right now I'm thinking about good way to store result from whois, but i dont want to store whole response ...
0
votes
0answers
13 views

MongoDB duplicate “_id ” for an array “_id”

Consider db "test" in my standalone mongodb instance. I created a collection called testCol and inserted a document with the following syntax : db.testCol.insert({_id:{"age":22,"empId":1},"DOJ":"...
0
votes
1answer
695 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
0answers
16 views

MongoDB - multiple harddisk failure [closed]

I have been running a MongoDB instance in a VM for the past three years. During the course, my server hard disk has failed 4 times and I have to replace it with a new one and restore the data. While ...
0
votes
1answer
9 views

getIndexes is not a function on mongo shell

I'm trying to get the index of a collection. > db.version() 3.2.6 > db.getCollectionNames() [ "last_aggregated_stat_ids", "mapps", "stats", "system.indexes" ] > db.mapps.getIndexes() [ ...
0
votes
1answer
162 views

Does remove document automatically remove the index that reference this document?

I am wondering if removing the document will automatically update the index if this document is referenced?
0
votes
1answer
225 views

How to setup sync between MongoDB and C# .NET Application

What is the best practice to synchronize a MongoDB remote database with a C# .NET App that would allow queries to be responded to within the local file system and update itself when there is a change ...
0
votes
1answer
500 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
1answer
115 views

Error while doing in replicaset in windows (mongodb)

I tried doing the replicatset in windows, but im getting the below error. I checked the mongo process and killed the existing process. Even though the error exists. help me on this pls Thx ...
0
votes
1answer
99 views

MongoDB replication doesn't work using Java driver

I have a three instance replica set and i am using the following code to insert values in my mongodb database constantly. MongoClient client = new MongoClient(Arrays.asList( new ...
0
votes
1answer
118 views

MongoDB Tag-Aware Sharding Workflow

I wonder the work flow of sharding cluster in Tag-Aware Sharding. --- Sharding Status --- sharding version: { "_id" : 1, "version" : 3, "minCompatibleVersion" : 3, "currentVersion" ...
-4
votes
0answers
39 views

Retrieving the data based on id from table contains 2 million rows [closed]

I have one table/collection contains 2 million rows/document (id(20 alphanumerical digits), name, ... etc). From that table I want to retrieve data based on the id within 1 sec Which database ...
5
votes
1answer
9k views

How restore a specific database from backup using mongorestore command

I created a backup of all my databases using mongodump command. Now I want to restore a specific database using mongorestore command. How is this possible, I use this command: --db option then ...
1
vote
0answers
48 views

Progress of mongodump operation jams at a random point

We are executing remote mongodumps to backup collections. For some time now sporadically one of these dumps stops to progress any further and remains to log out the same amount of documents processed ...
0
votes
0answers
19 views

MongoDB gets corrupted after docker container restart (WT_NOTFOUND)

Sometimes, with no particular explicit reason, MongoDB gives me this error: [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage ...
0
votes
0answers
15 views

Cannot connect to a mongos

I am implementing a sharded cluster in a Windows environment. I first create the config server as follows: C:\MongoDB\bin>mongod –configsvr –bind_ip 192.168.1.4 –port 3000 –dbpath C:\Sharding\...
1
vote
0answers
36 views

How to improve performance of this aggregate query?

I have the following tables in MongoDB: Users table (count 200+ users): { "_id" : ObjectId("56dd6204ce47a3c44d8b4567"), "u_role" : "1", "u_fname" : "dsfsd", "u_lname" : "dsfdsf", "u_email" : "dsfds@...
0
votes
1answer
124 views

mongo-express isn't listing my database

I have a setup with two databases, "admin" and "local". I'm using mongo-express with this config, but only seeing my admin database: 'use strict'; var url = require('url'); if (typeof process.env....
1
vote
2answers
672 views

Locked out of my own database through invariant() failure

I am trying to set up mongodb on my own server and connect to it remotely through my laptop. I had successfully installed the database and created my own user with admin privileges. However, when I ...
6
votes
2answers
3k views

Error parsing YAML config file: yaml-cpp

I'm using the following command (Windows machine) with the MongoDB shell version: 3.0.7: mongod --config "G:\NodeApps\mongod.cfg" --install Contents of mongod.cfg file are given below: systemLog: ...
0
votes
1answer
153 views

MongoDB won't start with access control turned on

Hello I would appreciate any suggestions, I have a 3 member MongoDB replica set setup on CentOS I'm trying to configure wit access control: node1, node2, arbiter, When I do not configure security ...
1
vote
1answer
108 views

Error 13141 in mongos shell while trying to write to a result of the mapReduce invocation to a sharded collection

In our db init script, we have the following lines: var conn = new Mongo(); var admin = conn.getDB("admin"); var db = conn.getDB("foodb"); admin.runCommand({ "enableSharding": "foodb" }); // ... db....
1
vote
1answer
124 views

MongoDB with Sharding has slow performance

I have the following setup for my MongoDB Sharded Cluster (everything is running on the same machine on localhost, just different port numbers): ConfigServers : 1 ReplicaSet consisting of 3 mongod ...
1
vote
1answer
1k 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. ...
0
votes
0answers
20 views

MongoDB or ElasticSearch

Which one of them is good to use? I'm developing a application which will have the following functionalities. Multiple users Each user will have their own database Data objects will be different; ...
0
votes
1answer
337 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 ...
2
votes
1answer
205 views

cnames for mongo config server

I am seeing this line in many mongoDB links Use CNAMEs to identify your config servers to the cluster so that you can rename and renumber your config servers without downtime I need some help ...
0
votes
0answers
56 views

mongs failed to findone when collection is under sharding migration

I have a collection which enabled sharding on 2 replica sets, rs01 and rs02. I added a new replica set rs03, it started to migrating chunks to rs03 slowly(it only migrated about 300 chunks in 4 days......
0
votes
1answer
2k 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" ...
0
votes
1answer
2k 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: ...
1
vote
1answer
217 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. ...
0
votes
0answers
9 views

Mongodb, high disk write volume

On my developer machine (iMac) I was running mongodb locally and experienced high disk activity - 50-70MB/s writes. I found out the activity came from Mongodb, but I was not doing anything other than ...
0
votes
1answer
159 views

What are minimum configurations for mongodb replica set though a java program

I'm new to morphia. I'm using morphia and mongo-java-driver.jar to talk with replicaset(I need for cluster also) through a java program. I'm new to morphia. Wrote a sample program code is below ...
0
votes
0answers
21 views

Mongo DB services went down while creating indexes in >300GB Mongo database instance

While creating index for a collection in Mongo DB instance.Mongo DB services went down with below error. kindly help on how to overcome the same.For smaller database instances it went fine. Command ...
0
votes
0answers
27 views

Can one database affect the performance of another in MongoDB?

We have a fairly beefy server (15 GB RAM, 2 cores) running a reasonably large MongoDB instance. The Mongo instance hosts two separate databases that communicate via application code. The larger ...
0
votes
1answer
22 views

Standalone Backup and Restore Tools

We plan to have our build server perform a backup (mongodump) from our Production environment and restore it (mongorestore) to the Test environment for each new release to Test. Are there mongodump ...
0
votes
0answers
14 views

Migrating an active production sharded MongoDB 2.6 environment

We're currently considering migrating our live production MongoDB (2.6) environment (18 shards with replica sets, around 600GB of data, hosted service with very little user permissions) to a different ...
0
votes
1answer
13 views

What would be better long term: Creating many documents in MongoDB or fewer documents with nested arrays

I have a scenario I'm debating for my app. Let's say I have a Quiz application with a MongoDB structure that looks like this: { _id: xxxxxx, userId: xxxx, quizData: [ { name: xxxx, quizId: xxxx, ...
1
vote
1answer
120 views

Why does restarting MongoDB 3.0.x boost performance?

I have a MongoDB in my Development environment running on Windows, the server has 64GB of RAM, but MongoDB has only consumed 26.9GB (here we are building the database), so it should be able to hold ...
1
vote
1answer
138 views

Indexing a date field on MongoDB - best practice

Hi We would like to index a date field on a potentially large collection. Is indexing a date-time field a good practice? Or should we stick to a date field (e.g. 07/12/2017) indexing (both of the ...