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

learn more… | top users | synonyms

1
vote
1answer
82 views

Measuring MongoDB I/O and CPU performance

I am new to MongoDB and I'm experiencing this NoSQL db through a series of very simple queries, with an Oracle exported data set. Aside measuring the execution time with primitives like ...
0
votes
0answers
59 views

MongoDB: Change block_compressor for existing collection

I have a server running with wiredTiger storage engine, but without compression enabled globally. Now I want to change the "block_compressor" option for a single collection to use "snappy". According ...
1
vote
1answer
76 views

Ideal database to store/query data submitted through dynamic user created forms

I am designing a web application that allows administrators to create public facing forms. The fields that can be included in the forms are anything from text fields to radio buttons. I need a ...
1
vote
1answer
24 views

Export and Import MongoDB?

I come from a bash and mysql environment. I'm trying to get use to mongodb. I see there are different ways to export and import mongodbs. Does anyone know the bash and mongodb equivalent of ...
0
votes
3answers
2k views

mongoimport error - Failed: error connecting to db server: no reachable servers

I am currently trying to learn mongodb and I am having trouble finding a solution for this problem. When I run a mongoimport command it I get the following error: ~ mongoimport --host localhost ...
0
votes
0answers
38 views

design of schema in mongoDB

I'm using mongoDB as my database. i have an record of 100 hospitals. To store all the information i'm designing schema of my database for that i've three solutions: i can create collection for each ...
0
votes
0answers
10 views

impact on Nodejs app - Disable Server-Side Execution of JavaScript --noscripting

What does the startup option --noscripting do exactly? What is the impact on a Nodejs app? What does not work anymore if we Disable Server-Side Execution of JavaScript? The admin guys are the only ...
1
vote
1answer
51 views

mongodump replicaset - 10 hours data loss acceptable - do we need --oplog (oplog.bson) option?

We have a 3 node replica set. We take backups from secondary with mongodump. Our customer said that it's ok too loose 10 hours of data in worst case. So we decided we don't need point in time ...
1
vote
0answers
27 views

what is getmore / cursor batch

In MongoDB world you see often getmore. For example in mongostat. What is that exactly? What would be the analogous term for MySQL/MariaDB or Oracle RDBMS?
3
votes
1answer
47 views

Does it make sense to limit Mongo RAM?

I have a Windows server running MongoDB. My database has big indexes and all RAM is usually busy. As I know, it can be a cause of Windows swapping and performance issues. Does it make sense to limit ...
-2
votes
1answer
88 views

Why are writes failing in MongoDB?

Here is the information about my development environment: Microsoft Visual Studio Community 2015 .NET Framework 4.6 ASP.NET MVC assembly System.Web.Mvc Version=5.2.3.0 MongoDB.Driver 2.0.1.27 ...
0
votes
1answer
129 views

Why does MongoDB give me the cannot use 'w' > 1 when a host is not replicated Error message?

Here is the information about my development environment: •Microsoft Visual Studio Community 2015 •.NET Framework 4.6 •ASP.NET MVC assembly System.Web.Mvc Version=5.2.3.0 •MongoDB.Driver 2.0.1.27 ...
1
vote
0answers
39 views

Identify a blocking process in MongoDB

I have a single MongoDB instance is performing quite badly. I noticed that db.currentOP().inprog.length quite often becomes quite big, sometimes even goes up to 100. When I drill down to the actual ...
0
votes
1answer
656 views

MongoDB replica set configuration error

I am trying to set up a MongoDB replica set on Digital Ocean. I edited /etc/mongo.conf and specified replica set id: replSet=rs1 and did not change anything else. I did rs.initiate() on the first ...
1
vote
1answer
43 views

MongoDB schema for a news service

I would like to create a mongoDB database that would be very similar to how various news services store and display their data. The database would be queried by an android phone. Lets have a look at ...
3
votes
2answers
184 views

When is the _id index used?

When is the _id index used by MongoDB? I could not find anything specific about it in Index Introduction, Analyze Query Performance, and Query Plans. When sorting by _id at the end of the query via ...
0
votes
1answer
130 views

Replica set read preference nearest is still slow

NOTICE: I've also posted this to stackoverflow. I'm not sure where this question belongs. If it's not here, tell me, and i'll delete it. I'm testing my replica set, in particular the read preference, ...
0
votes
1answer
80 views

How to add shards in mongodb cluster?

I am implementing mongodb cluster. Config server and router working fine but when i am adding shards from server i am getting a error. { "ok" : 0, "errmsg" : "couldn't connect to new shard ...
3
votes
1answer
85 views

Mongo Scaling - Too Many Connections - Linear Horizontal Scaling with 100s of App Servers

I have a Mongo Cluster. It's sharded on 6 servers, with 6 replica sets, each replica set having one Primary, and two Secondaries. Additionally, there are 3 config servers. Though, I think the Mongo ...
0
votes
1answer
74 views

Fastest way to sync (or keep import) 3.5TB data from hadoop to sharded mongodb cluster

There are 3.5TB data in our hadoop cluster(yes on hdfs). And we have newly built a sharded mongodb cluster(the latest 3.x) with 3 mongos, 3 configdb and 3 shards(each shard has 1 primary and 2 ...
0
votes
1answer
102 views

Mongodb background indexing - no progress

I have added a couple of background indexes on few collections on mongodb replicaset (3.0.2, MMAPv1 storage), and since then I'm seeing following entry in db.currentOp(true) response in all nodes ...
1
vote
1answer
34 views

Where to store data on AWS?

I'm using AWS to host my application, and I'm using mongodb as db. I have installed mongodb on amazon ec2, but now I have no idea about where I should store all of my data. Can I store all of my data ...
0
votes
1answer
60 views

MongoDB switch to smallfiles

I've reached a point where mongo fails to start because there's no enough free disk space. The log suggests using the --smallfiles option to start the mongod service. So, I have two options, either ...
1
vote
1answer
170 views

Mongo Storage Engine from mmap to wiredTiger

We have a mongo(v3.0.3) database->collections which is in mmap storage engine. We are trying to change it to wiredtiger we tried the process below.But we still see the same old storage engine ...
0
votes
1answer
20 views

Handling modifications of fields within a document

I have a basic web app where with the following hierarchy being persisted >User1 >Client1 >ID >Name >Profession >Client2 >ID >Name >Profession ...
2
votes
1answer
88 views

MongoDB Ops Manager - CPU Time - No data available

We have 5 groups and enabled on all groups monitoring agent. We use Ops Manager 1.6.2.251. All metrics get collected and are available in a nice graph. CPU Time is not available on all groups. Our ...
2
votes
1answer
88 views

Steps to setup mongo replica set

I am having problems setting up a mongo replica set. I have 2 servers and want one to be primary and one to be secondary. On primary machine in mongod.conf: replSet=rs1 Then in the console I ...
1
vote
2answers
114 views

parse rs.status() output to display one secondary node for mongodump destination

I wish to run mongodump to secondary (not primary). So I need as output hostname and port of one secondary. # ./mongo -udbadm admin --port 27100 -p --quiet --eval ...
0
votes
1answer
124 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 ...
1
vote
1answer
712 views

MongoDB update object in Array

I have the following document: { "name" : "student_1", "courses" : [ { "name" : "Algebra", "grades" : [ 98, 96, 92 ] }, { "name" : ...
0
votes
1answer
185 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
0answers
37 views

mongodb: fail for removing shard from shardings

When I try to remove a shard from my mongodb sharding, I got the following error: Sun Sep 6 11:30:09 [Balancer] going to move { _id: ...
0
votes
0answers
30 views

2dsphere index - warning insert of geo object generated lots of keys

When i try to create an index on {areaPolygon: "2dsphere"} i am getting the following warning: insert of geo object generated lots of keys (17618) consider creating larger buckets. obj={ _id: ...
0
votes
0answers
16 views

mongodb sharding by id, based on the first 8 characters

we have a database full of grams,and they're organised in a tree fashion, with parent references, like so: _id: gram:a;p1:as;p2;astr;p3;astrot;p4:astrotur;word:astroturf we would like to chunk the ...
1
vote
2answers
163 views

What will happen if the primary shard for a mongodb database is down?

Well as I understand each database has it's primary shard, which is mostly the first shard added to mongodb cluster. And we know that balancer will not split chunks until the chunksize is bigger than ...
2
votes
0answers
29 views

Impact of adjusting Time of Mongodb server?

Using Ubuntu 14.04 and mongodb 2.6.10 I have time difference between a replica machine and primary , my secondary isn't configured with NTP what are the implications of adjusting time on the ...
4
votes
1answer
69 views

What exactly are secondary members acknowledging in replicasets with MongoDB?

I try to understand the mechanics and behavior of MongoDB's replica-features better. I hope to get some insightful information from someone who is familiar with mongo's internals and behaviour. My aim ...
2
votes
1answer
4k views

How restore a specific database from backup using mongorestore command

I created a backup of my all database 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 mongodb ...
0
votes
1answer
302 views

mongod 2.6 corruption (Assertion failure isOk() src/mongo/db/storage/extent.h 80)

I have been using mongo 2.6.0 for some time on 64-bit centos (with journaling enabled). One fine day when we were testing to insert a document to one of the collections, we started seeing data ...
0
votes
0answers
115 views

how to restore the copied mongodb files in a server?

I have copied mongodb database files from my local machine into a server. How can i restore these files in the server and use them? Please help.
1
vote
0answers
82 views

Why mongodb never end some connection

My mongod runs out of connections from time to time. But when I restart the instance, it becomes normal. I check the log and found some connections were created and never be ended. This cause the ...
2
votes
1answer
61 views

How to deploy MongoDB config servers to achieve maximum availability during network partitions?

What's the recommended way to deploy config servers? Assume, we have two shards, each one is a 3-nodes replica set. If I deploy all config servers together with one of these shards, a single network ...
0
votes
2answers
478 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 ...
0
votes
1answer
56 views

No Data Replication in Progress mongodb

Setup Information One ConfigServer mongod.exe --configsvr --dbpath C:\MongoDBCluster\ConfigSrv --Mongos Server-- mongos.exe --configdb 10.133.1.130) 2 Shard Servers mongod.exe --shardsvr ...
1
vote
1answer
65 views

What kind of database should I use?

I'm designing a new system and I'm wondering what kind of DB should I use for my needs. I have a tree structure of nodes, where each node has historic values. For each historic value it should hold 2 ...
0
votes
0answers
34 views

GridFS “UPLOAD-ONLY” permissions

I need to allow UPLOAD-only to GridFS. Does restricting role to "insert" to fs.files and fs.chunks do the trick? Does GridFS perform any actions except "insert" onto fs.files during upload?
0
votes
1answer
24 views

Mongo DB Site to Site Migration

I am somewhat new to MongoDB but I do have some experience with MySQL and PostgreSQL. Currently, I need to migrate Mongo DB from one site to another. The sites should be identical (development and ...
1
vote
1answer
74 views

Monitor disk usage with MongoDB Ops Manager

We use MongoDB Ops Manager 1.6.2.251. I searched Activity -> Alert Settings. Is there a way to monitor disk usage? To get an alert if this changes to 90%: # df -h /data/ Filesystem ...
1
vote
1answer
187 views

What's the procedure to set up username/password on mongodb?

I have tried setting up username / password .But none of the methods seems to work. 1. In mongod.conf ----> remove **#auth=true** to **auth =true** 2.Started the mongod server --> sudo ...
0
votes
0answers
67 views

How to read from Mongodb secondary Only in a replica set?

Mongodb version 2.6.10 Ubuntu 14.04 Currently having a replica set of 4 nodes , my read preference is Primary Only , I configured one node with priority 0 Also i have a file on the priority 0 node ...